peskywinnets
Registered User.
- Local time
- Today, 03:43
- Joined
- Feb 4, 2014
- Messages
- 578
I'm trying to parse a bit of JSON like this...
...I'm interested in orderIDs (50 of them) ......the path to this field is showing at the top of the jpg.
I've clearly got my code set wrong, as after 6 loops it exits (if you look at the top of the jpg there are 6 objects), so I need to set the Json parser up to do a level down.
here's what I've done...
It works, but only loops 6 times.
Surely something embarrassingly basic (I'm not that well versed in nested JSON)
top tips welcome
...I'm interested in orderIDs (50 of them) ......the path to this field is showing at the top of the jpg.
I've clearly got my code set wrong, as after 6 loops it exits (if you look at the top of the jpg there are 6 objects), so I need to set the Json parser up to do a level down.
here's what I've done...
Code:
Set json = JsonConverter.ParseJson(XMLHTTP.responseText)
For Each OrderId In json
orderID = json("orders")(i)("orderId")
next OrderId
It works, but only loops 6 times.
Surely something embarrassingly basic (I'm not that well versed in nested JSON)
top tips welcome
