How do I load JSON into an array?

Get help using Construct 2

Post » Mon Apr 27, 2015 7:29 pm

I have the following JSON and I would like to load it into an array but it wont work.
Array - Load from JSON string ~
The Array has a size of x3, y2 z1. Why isnt it working? :/

Code: Select all
{
  "x" : "y",
  "a" : "b",
  "c" : "d"
}
B
12
S
3
Posts: 211
Reputation: 1,477

Post » Mon Apr 27, 2015 7:49 pm

"{""c2array"":true,""size"":[3,2,1],""data"":[[[""x""],[""y""]],[[""a""],[""b""]],[[""c""],[""d""]]]}"
B
66
S
24
G
7
Posts: 1,514
Reputation: 11,039

Post » Mon Apr 27, 2015 7:51 pm

okay..so the format is incorrect. Is there a way to convert it into the construct 2 format?
B
12
S
3
Posts: 211
Reputation: 1,477

Post » Mon Apr 27, 2015 7:55 pm

B
66
S
24
G
7
Posts: 1,514
Reputation: 11,039

Post » Mon Apr 27, 2015 8:02 pm

this doesnt help at all. I would like to convert it dynamically...while running the app. But thank you

/e: it works like this: tokenat(AJAX.LastData,11, """") its not the best solution..but its fine. I don't need an array then aswell :)
B
12
S
3
Posts: 211
Reputation: 1,477


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 43 guests