I would like to convert this string
{"id":1,"name":"Test1"},{"id":2,"name":"Test2"}
to array of 2 JSON objects. How should I do it?
best
Using jQuery:
var str = '{"id":1,"name":"Test1"},{"id":2,"name":"Test2"}'; var jsonObj = $.parseJSON('[' + str + ']');
jsonObj is your JSON object.
jsonObj
1.4m articles
1.4m replys
5 comments
57.0k users