Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
187
rated 0 times [  193] [ 6]  / answers: 1 / hits: 109938  / 13 Years ago, thu, january 12, 2012, 12:00:00

Possible Duplicate:

Serializing to JSON in jQuery

Convert Object to JSON string






I want to convert array to json object in js or jquery.
Is there any function is available or lib



Thanks in advance


More From » jquery

 Answers
11

In modern browsers you can simply use JSON.stringify(someJSObject) to convert any JavaScript object (that includes arrays) to a JSON string.



To ensure it also works in less modern browsers, include https://github.com/douglascrockford/JSON-js/blob/master/json2.js on your page.


[#88057] Wednesday, January 11, 2012, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
jaredsages

Total Points: 273
Total Questions: 97
Total Answers: 105

Location: French Southern and Antarctic Lands
Member since Fri, Jan 6, 2023
1 Year ago
jaredsages questions
;