aspjson
aspjson copied to clipboard
empty primary key
I have a json string:
[{"file":"78jsyhpg9mtf.jpg"},{"file":"imqk2680ra4p.jpg"}]
that doesn't have primary object name. It is accessible via data(0)...
But how do I iterate with for next loop over all elements in collection?
Using
Set oJSON = New aspJSON for each file in oJSON.data() ... next
obviously doesn't work. And I can not use oJSON.data("name") as the collection does not have primary data object.
How can I iterate or at least find the number of records, so I could use for next with x=0 to number of records?
I had the same problem, try
Dim i
For Each i In oJSON.data.Items
response.write i.item("file") & "<br>"
Next