How do I get json info from array into json?

0 favourites
  • 6 posts
From the Asset Store
Cordova device Info mobile and browser modules detect-gpu
  • Hi... can someone tell me how can i read this json info to get in an array?

    {

    "lastUpdateId": 592561749532,

    "E": 1626660385862,

    "T": 1626660385852,

    "bids": [ [ "16.69200", "123" ],

    [ "16.69100", "82" ]

    }

    I need only the content of bids...

  • You need to load this into JSON object using Parse action.

    After that you can read values in bids section with JSON.Get

    For example JSON.Get("bids.0.1") will return 123

  • Hi. no, It doesn't work like that either ...

    (Loading the data from a web with ajax) The data is loaded well in Json, but it does not recognize me to insert it into the array.

    {

    "lastUpdateId":594008409335,

    "E":1626723768975,

    "T":1626723768970,

    "bids":

    [

    ["0.1624","44198"],["0.1623","84634"],["0.1622","71814"],["0.1621","33161"],["0.1620","119369"],["0.1619","31096"],["0.1618","91864"],["0.1617","29794"],["0.1616","49058"],["0.1615","260063"],["0.1614","29659"],["0.3248","81"]

    ]

    }

    This is the content of JSON.

    I need to separate the "Bids" values ​​into an array, and I can't get them.

    In other consult i have this JSON results,

    And I can't get the intermediate values ​​either

    ("31743.95", "31795.00", "31715.00", "31750.68", "3113.974") For example

    [

    [ 1626600600000, "31743.95", "31795.00", "31715.00", "31750.68", "3113.974", 1626601499999, "98870777.70955", 24287, "1703.773", "54098292.89283", "0" ],

    [ 1626601500000, "31750.67", "31850.00", "31700.53", "31720.75", "5885.388", 1626602399999, "187076704.82843", 41161, "2871.636", "91296797.78024", "0" ],

    [ 1626602400000, "31720.74", "31722.71", "31547.99", "31596.32", "8358.152", 1626603299999, "264442181.43620", 60650, "3610.197", "114242044.52215", "0" ]

    ]

    I appreciate in advance any possible help

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • In other consult i have this JSON results,

    And I can't get the intermediate values ​​either

    ("31743.95", "31795.00", "31715.00", "31750.68", "3113.974") For example

    [ > [ > 1626600600000, > "31743.95", > "31795.00", > "31715.00", > "31750.68", > "3113.974", > 1626601499999, > "98870777.70955", > 24287, > "1703.773", > "54098292.89283", > "0" > ],

    [ > 1626601500000, > "31750.67", > "31850.00", > "31700.53", > "31720.75", > "5885.388", > 1626602399999, > "187076704.82843", > 41161, > "2871.636", > "91296797.78024", > "0" > ],

    [ > 1626602400000, > "31720.74", > "31722.71", > "31547.99", > "31596.32", > "8358.152", > 1626603299999, > "264442181.43620", > 60650, > "3610.197", > "114242044.52215", > "0" > ]

    ]

    I appreciate in advance any possible help

    I can solve this part with

    JSON.GET(".1") or (".2") etc...

    But i cant take the first consult (BIDS) yet...

  • Here you go, this example extracts all values into C3 array:

    dropbox.com/s/bkx0p1e28ac4tdj/JSON_extractArray.c3p

    You can also use this demo to read all keys from JSON:

    dropbox.com/s/srgf9lme08by9wa/JSON-RecursiveRead.c3p

  • Thanks so much... this work really good!!!

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