Json 2 dimensional arrau

Just started using Construct 2? Post your questions here

Post » Tue Sep 13, 2016 12:57 am

I'm unable to write a 2 dimensional Json array. can someone give me a short example?
B
9
S
3
Posts: 31
Reputation: 708

Post » Tue Sep 13, 2016 1:30 am

Array(3,2,1)
Code: Select all
{"c2array":true,"size":[3,2,1],"data":[[["one"],[4]],[["two"],["five"]],[[3],[6]]]}

Code: Select all
{"c2array":true,"size":[3,2,1],"data":
   [
     [["one"],[4]],
     [["two"],["five"]],
     [[3],[6]]
   ]
}


Array(3,3,1)
Code: Select all
{"c2array":true,"size":[3,3,1],"data":[[["one"],[4],["seven"]],[["two"],["five"],["eight"]],[[3],[6],["nine"]]]}

Code: Select all
{"c2array":true,"size":[3,3,1],"data":
     [
      [["one"],[4],["seven"]],
      [["two"],["five"],["eight"]],
      [[3],[6],["nine"]]
    ]
}


you can use Browser object
Image

check also Array contents editor
B
67
S
24
G
7
Posts: 1,518
Reputation: 11,072

Post » Tue Sep 13, 2016 12:29 pm

Thank you once again, Korbaach.
B
9
S
3
Posts: 31
Reputation: 708


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 0 guests