Parse json object with arrays
I have a json in this form:
var test = { "name1" : [ "aaa", "bbb"], "name2" : [ "ccc", "ddd" ] };
I've tried to iterate this like
for (var names in test )
{
for ( var element in names )
{
// problem we got the chars in the "names1", etc
}
}
What exactly I missed?
No comments:
Post a Comment