Json Manager (Construct 3 Plugins)

You're viewing a single comment in a conversation. View all the comments
  • 6 Comments

  • Order by
  • I'm away from my computer now for a bit. The example should have a load from string button. You don't have to specify the slot in the ui. The load string will create the slot. I haven't hooked up any out put to the debug window yet. The easiest way is to use the browser alert and use the json manager to get a value

    You don't have to use the original load method if you are using the string one.

    • Hi,

      I got it to work! (and noticed the loadstring in the example).

      I got one problem left, though -- probably related to the json format google sheet returns:

      It looks like this:

      In trying to get the values into a dictionary or array, i am getting lots of brackets like: [[["str1"]]]

      and when trying to loop over things its not clear to me what the query expression is after "values", to get at individual strings.

      The objective is to get all of them into a listbox.

      any thoughts are much appreciated.

      Dan

      {

      "range": "Sheet1!A4:A7",

      "majorDimension": "ROWS",

      "values": [ [ "str1" ],

      [ "str2" ],

      [ "str3" ]

      ]

      }

      • Here is an example when i use array.asJson:

        {"c2array":true,"size":[22,1,1],"data":[[[["str1"]]],[[["str2"]]],[[["str3"]]]]]]}

        • Was this generated from the JsonManager. What might be easier if you have a sample project I can look at to see if I can help

          • Thank you.

            Yes, its basically the to array function applied to JsonManager and then the array is displayed as json.

            I will put together a sample project.

            Is there a way i can send it to you?

            • if you just put it up on google drive, one drive, etc... and just share it and send me the link I'll be more than happy to take a look