0 Favourites

Ajax request json file not functioning well

  • I'm working on this part of my game where i request a url which is expected to return a a json string to me.

    when i just call the url on my browser i get the expect dat which is

    {

    "c2array": "true",

    "data": [     [       [         "daarsat"       ],

          [         "oreke"       ],

          [         "test@example.com"       ]

        ],

        [       [         2000       ],

          [         100       ],

          [         0       ]

        ]

    ],

    "size": [     2,     3,     1 ]

    }

    but on calling from inside construct using ajax, i don't get to be able to manipulate my data right, i loaded the expected data into an array, and tried to display as json to check the received data and i get this.

    {"c2array":true,"size":[2,3,1],"data":[[[0],[0],[0]],[[0],[0],[0]]]}

    <img src="https://www.dropbox.com/s/zrsxymwmzz0o5sx/chkk.PNG" border="0" />

    Please can anyone check what i'm doing wrong

    <img src="https://www.dropbox.com/s/zrsxymwmzz0o5sx/chkk.PNG" border="0" />">

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)