Access variable value in JSON? [SOLVED].

0 favourites
  • 2 posts
From the Asset Store
Easily store, modify, read and manipulate colors with Color Variables!
  • EDIT

    Ok, I'll use a row in an array to indicate the type of object to create.

    So:

    Column 0 object type

    Column 1 object state in JSON

    ---------------------------------------------

    Hello, I have saved the state of an object in JSON, now I want to query the value of a variable in the JSON string.

    How do I query the value of a variable in a JSON string?

    I need to create objects from JSON strings, so to know which object I have to create from a string, I need to query the value of an object variable that indicates what kind of object it is.

    I have seen that C2 does not save the object type when using "AsJSON".

    It only saves the state of the object but does not indicate what kind of object it is.

    At least it does not in a text variable that indicates the name of the type of object as "Tilemap" or "Sprite"

    Here you can see that there is no variable with the name of the type of the object.

    So if I give you that information in JSON and I say "you must create an object in that state", you will not know what kind of object you should create.

    So my question, I need to query the value of an object variable that I will use to indicate the type of object that I must create from a JSON string.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • What was the solve?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)