I recently encountered an issue while trying to store values in a JavaScript object notation. After some programming, I managed to store all occurrences in a string separated by commas. However, when the term I'm looking for is an array, I receive [object object] as the output, understandably so. My goal is to figure out how to store all items within that array into a variable separated by commas. For instance, if I choose "Time", it should return Dec 9, 1, 2012
I have made progress and can retrieve the value if it's not an array: http://jsbin.com/obehog/3/edit
The complexity arises from the fact that the depth of the arrays may vary, making it impossible to use a loop in every case.