How can I display json formatted data receiving from ajax

0 favourites
  • 4 posts
From the Asset Store
Data+ is the best Data Management solution for Construct 3. It contains 4 Addons (Plugin & Behavior).
  • I am trying to display some data coming from php ajax

    How can I display json formatted data receiving from ajax,

    Below is my formatted json

    {

    "c2array":true,

    "size":[1,6,4],

    "data":[ [[4837],["test2"],[2],["1"]],

    [

    [700],["test6"],[6],["5"]], [

    [600],["test1"],[1],["4"]], [

    [30],["test1"],[1],["3"]], [

    [10],["test1"],[1],["1"]], [

    [10],["test1"],[1],["2"]]]

    }

    I am trying to store data inside array,but i am not sure it is coming inside or not.

    Trying to print out data using array.at(0,0,0) also tried with str(array.at(0,0,0))

    Please

    Please

    Please suggest,how to manage this one

  • Review the attached .capx at this thread...

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi,

    redrocket, thnx for your response

    I was already following your post,

    But cannot see updated .capx file, that one in not receiving response inside text.

    Please suggest how to access data with data position

    Thank you

  • After receiving the JSON response from the AJAX plugin, the JSON response is going to have to be put into an array. There is the Array, Hash, Dictionary, Table, and even a JSON plugin which should accomplish this. Once you load the JSON data into the array of your choice, you can use that plugin's functions to access the data position.

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