I’m playing around with the twitter API and it’s returning the following:
[ 12345, 12345, 12345, 12345 ]
How do I go about parsing this into an array or object?
I can’t see how to do it using $.getJSON as there are no keys to reference the data with.
Any help would be greatly appreciated, cheers.
You won’t need keys in this case, in your success function just loop through they array, for example:
They point is the object might already be an array, so just loop through it, it doesn’t need to be
data.key[0], it may just bedata[0], which is what you have here 🙂