Using jQuery:

var str = '{"id":1,"name":"Test1"},{"id":2,"name":"Test2"}';
var jsonObj = $.parseJSON('[' + str + ']');

jsonObj is your JSON object.

Answer from darioo on Stack Overflow
๐ŸŒ
W3Schools
w3schools.com โ€บ js โ€บ js_json_stringify.asp
JSON.stringify()
Use the JavaScript function JSON.stringify() to convert it into a string.
๐ŸŒ
MDN Web Docs
developer.mozilla.org โ€บ en-US โ€บ docs โ€บ Web โ€บ JavaScript โ€บ Reference โ€บ Global_Objects โ€บ JSON โ€บ stringify
JSON.stringify() - JavaScript | MDN
The JSON.stringify() static method converts a JavaScript value to a JSON string, optionally replacing values if a replacer function is specified or optionally including only the specified properties if a replacer array is specified.
๐ŸŒ
W3Schools
w3schools.com โ€บ js โ€บ js_json_parse.asp
JSON.parse()
... <p id="demo"></p> <script> ... Yourself ยป ยท When using the JSON.parse() on a JSON derived from an array, the method will return a JavaScript array, instead of a JavaScript object....
๐ŸŒ
MDN Web Docs
developer.mozilla.org โ€บ en-US โ€บ docs โ€บ Web โ€บ JavaScript โ€บ Reference โ€บ Global_Objects โ€บ JSON โ€บ parse
JSON.parse() - JavaScript | MDN
Because JSON has no syntax space for annotating type metadata, in order to revive values that are not plain objects, you have to consider one of the following: Serialize the entire object to a string and prefix it with a type tag. "Guess" based on the structure of the data (for example, an ...
๐ŸŒ
ReqBin
reqbin.com โ€บ code โ€บ javascript โ€บ n2ek7onb โ€บ javascript-array-to-json-example
How do I convert JavaScript array to JSON?
The JSON.stringify(value, replacer, space) method in JavaScript converts arrays and objects to a JSON string. This is necessary when sending data over the network using XMLHttpRequest and the Fetch API (or other communication libraries).
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ javascript โ€บ how-to-convert-json-to-string-in-javascript
How to Convert JSON to string in JavaScript ? - GeeksforGeeks
July 23, 2025 - In this approach, using JSON.stringify() in JavaScript, specifying optional parameters for indentation to format JSON data into a more readable and structured string representation for debugging or visualization.
Find elsewhere
๐ŸŒ
RSWP Themes
rswpthemes.com โ€บ home โ€บ javascript tutorial โ€บ 4 methods to convert json object to string array in javascript
4 Methods To Convert Json Object To String Array In Javascript
April 5, 2024 - To begin with, we can utilize the JSON.stringify() method to convert the JSON object into a string and then use JSON.parse() to parse it back into an array. ... Description: The JSON.stringify() function converts a JavaScript object or value ...
๐ŸŒ
SitePoint
sitepoint.com โ€บ blog โ€บ javascript โ€บ jquery convert json string to array
jquery convert json string to array โ€” SitePoint
February 12, 2024 - Here is an example: var obj = {name: "John", age: 30, city: "New York"}; var json_str = JSON.stringify(obj, null, 2); console.log(json_str); In this example, JSON.stringify() method converts the JavaScript object into a JSON string with indentation of 2 spaces.
๐ŸŒ
Jsontostring
jsontostring.com
Convert JSON to String Online
The JSON programming language also ... is "JSON Array". Additionally, we donโ€™t have any restrictions on the length of the content you need to convert. Our major goal is to make your editing process simple and effective without taking much of your time. Our JSON to String Converter tool is responsible for extracting all the string values from the JSON which means JavaScript Object Notation ...
๐ŸŒ
Quora
quora.com โ€บ How-do-you-convert-a-JSON-object-into-a-String-Array
How to convert a JSON object into a String Array - Quora
Answer: It kind of depends on what you intend on doing with the json object, and possibly what the json object contains. A using object is a linefeed delimited string. It may contain an array as one of its members. So if the intent is to store the entire json object as an array of strings, start...
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ how-to-convert-json-string-to-array-of-json-objects-using-javascript
Convert JSON String to Array of JSON Objects in JavaScript | GeeksforGeeks
December 4, 2024 - This allows developers to work directly with the data, enabling easier manipulation, analysis, and display of information. Using the JSON.parse() method, a JSON string can be easily converted into an array of JSON objects in JavaScript.