"squirreltown" wrote:
Thanks Mark but i'm not clear how to implement that, with xml the hierarchy was:
xml
tweetElements = xml.getchildElements()
for each tweet in tweetElements
switching json for xml i have:
json
tweetElements =? (what goes here? another "for each"? And for each what of what?
for each tweet in tweetElements
It's not as simple as switching xml for json. They are different types, like Mark said. Parsing XML gives you a roXMLElement with its own set of member functions. ParseJSON() returns a plain old roAssociativeArray, so you can work with it like you would any other roAssociativeArray. roAssociativeArray doesn't have a function equivalent to GetChildElements(). To step through the members of a roAssociativeArray, you'd do something like:
for each key in myAA
? key + ":" + myAA.Lookup(key) ' if the value isn't a string, this won't work, but you get the idea
next
Somewhere in the SDK sample code should be a function called PrintAA(). If you use that function on the result you get from ParseJSON(), you might get a better idea of what the structure looks like.