arrays - recursing through javascript object and store variables in to string -


I am trying to store values ​​within JavaScript Object Notation based on the field selected by the user. I was able to store the value in a string that separates from a comma, if BT is trying to find the word then there is an array, I get [commodity object] in return, because it is an array I want to know That I can store all objects in that array separated by commas, for example if I select "time", then it should be returned on December 9, 2012 < P> In The hijacking, parse a search function, if I argues am Antkount Power ( "Antitikount", within the data), type me a reasonable return 50, BSW Jesn Ive will be provided. If I add, pars ("time", data) is found, because it is an array, it gives [object, object], do not believe in those arrays and I want to display all the values ​​inside that array ( Like December 9, 1, 2012 ) and the key inside each array can be different and the depth of the array may also vary. Im just using a steady example here.

Part Ive returned back if a non-array,

Another example which I came close to, was a bad recapitulation on BT Im, so I got stuck on it.

And the depth of arrays can change, it will not be the same in every case. Then the loop will not work.

If I think you are right, Additional functions are needed, which will write the properties of all the objects in the object. See my solution:

Comments