JQuery | parseJSON() method Last Updated : 11 Jul, 2023 Comments Improve Suggest changes Like Article Like Report This parseJSON() method in jQuery takes a well-formed JSON string and returns the resulting JavaScript value. Syntax: jQuery.parseJSON( json )Parameters: The parseXML() method accepts only one parameter that is mentioned above and described below: json: This parameter is the well-formed JSON string to be parsed.Return Value: It returns the following: String NumberObject Array BooleanExample 1: In this example, we are using the above-explained approach. html <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>JQuery | parseJSON() method</title> <script src= "https://code.jquery.com/jquery-3.4.1.js"> </script> <style> #a { color: blue; } #b { color: red; } h1 { color: green; } body { text-align: center; } </style> </head> <body> <h1> GeeksForGeeks </h1> <h3>JQuery | parseJSON() method</h3> <b id="a"></b> <script> let txt = '{"name":"John", "age":30, "city":"New York"}' let obj = jQuery.parseJSON(txt); document.getElementById("a").innerHTML = "Object Name : " + obj.name + "<br> Object Age : " + obj.age; </script> </body> </html> Output: Example 2: In this example, we are using the above-explained approach. html <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>JQuery | parseJSON() method</title> <script src= "https://code.jquery.com/jquery-3.4.1.js"> </script> </head> <body style="text-align:center;"> <h1 style="color: green"> GeeksForGeeks </h1> <h3>JQuery | parseJSON() method</h3> <button onclick="gfg()"> Click </button> <script> function gfg() { let txt = '{"name":"Shubham Singh", "age":21, "Cars":"ABC" }' let obj = jQuery.parseJSON(txt); alert(obj.name === "ABC"); } </script> </body> </html> Output: Create Quiz Comment S shubhamsingh10 Follow 0 Improve S shubhamsingh10 Follow 0 Improve Article Tags : Web Technologies JQuery jQuery-Methods Explore jQuery Tutorial 7 min read Getting Started with jQuery 4 min read jQuery Introduction 7 min read jQuery Syntax 2 min read jQuery CDN 4 min read jQuery SelectorsJQuery Selectors 5 min read jQuery * Selector 1 min read jQuery #id Selector 1 min read jQuery .class Selector 1 min read jQuery EventsjQuery Events 4 min read jQuery bind() Method 2 min read jQuery blur() Method 1 min read jQuery change() Method 2 min read jQuery EffectsjQuery animate() Method 2 min read jQuery clearQueue() Method 2 min read jQuery delay() Method 2 min read jQuery HTML/CSSjQuery addClass() Method 2 min read jQuery after() Method 1 min read jQuery append() Method 2 min read jQuery TraversingjQuery | Traversing 4 min read jQuery add() method 1 min read jQuery addBack() Method 2 min read Like