I have a json request from an api in excel and I would like to convert it.
This is what I get:
{data:[{price: 3, amount:7},{price: 21, amount:16},{price: 18, amount:4}]}
I would like to convert this into:
{data:[[3,7],[21,16],[18,4]]}
How can I handle this ?
What I'm doing is here sorry about that:
text = DownloadTextFile("www../api/etc")
Set json = JsonConverter.ParseJson(text)
Then I would like to loop through;
For j = 0 To 100
Range("h" & j) = json(data)(j)(1)
Next j
But Range("h" & j) = json(data)(j)(1) of course does not work, as it is not an array. That is why I would like to convert it. I don't know how can I loop through the hash and get price and amount data.
I will use the library and write here in case I encounter with a problem, thank you!