I am trying to store the values inside a javascript object notation. I have done a bit of programing and got to store all the occureneces in to a string separated with commas, Bt if the term Im trying to find is an array, I get [object object] in return, as it is an array. I want to know how I can store all the items in that array in to a variable separated by commas, here for example if I select “Time”, then it should return Dec 9, 1, 2012
The part Ive reached returns the value if its a non array, http://jsbin.com/obehog/3/edit
and the depth of the arrays could change, it wont be the same in each case. so going through loop will not work..
if you select “Time”, the result is an array, like:
if you want a result like
Dec 9, 1, 2012, you need a method to parse an object to string (or string array), code like:the full demo
By the way, what you done is excellent, there are some other achieve like jsonselect and JSONQuery, Hope useful for you.