0

I have an array of objects named collection[]; eg. collection[0]={codec:"70",event:"keyup",time:"147625879"}

Now I want to convert the whole array to json object at once.

Joeri Hendrickx
  • 16,947
  • 4
  • 41
  • 53
vkashyap
  • 41
  • 4
  • You can use this solution http://stackoverflow.com/questions/2295496/convert-array-to-json – Boris Parfenenkov Feb 12 '14 at 14:37
  • Just took from the answer of the link: `for anyone still reading this answer, it's worth pointing out that all modern browsers include the JSON object as standard, which means that you don't need this script unless you're planning to support older browsers like IE7 or Firefox 3.0. See CanIUse for the support chart.` – Vadorequest Feb 12 '14 at 14:41
  • @Vadorequest, of course, your remark is very important if you don't support old browsers. Thanks! – Boris Parfenenkov Feb 12 '14 at 14:46

0 Answers0