How to parse JSON object using JSON.stringify() in JavaScript ? Last Updated : 26 Jul, 2022 Comments Improve Suggest changes Like Article Like Report In this article, we will see how to parse a JSON object using the JSON.stringify function. The JSON.stringify() function is used for parsing JSON objects or converting them to strings, in both JavaScript and jQuery. We only need to pass the object as an argument to JSON.stringify() function. Syntax: JSON.stringify(object, replacer, space); Parameter Values: This function accepts 3 parameters that are described below: object: It is the required value that is used to be parsed or converted to a string.replacer: To filter the result, a function or an array is used. If replacer is null or not given, the resultant JSON string contains all of the object's properties. This is an optional parameter.space: This parameter controls the space in the final string created by the JSON.stringify() method. It can be either a number or a string. If this is a number, it denotes the number of white space characters to use for indenting; this value is limited to 10. If this is a string, the whole string or its first 10 characters is utilized as white space. No white space is used if this option is not given (null). Return Value: A string representing the given value. Example 1: In the below example, the JSON object is being passed as a value to the JSON.stringify() function to be parsed. JavaScript <script> var obj = { name: "Vishal", email: "[email protected]", }; var result = JSON.stringify(obj); document.write("parsed object = " + result); </script> Output: parsed object = { "name":"Vishal", "email":"[email protected]" } Example 2: In the below example, the array is declared inside the object that is being passed as a value to the JSON.stringify() function to be parsed. JavaScript <script> var obj = { company: "GeeksforGeeks", courses: ['DSA', 'Web Tech', 'Placement_Preparation', 'DDA'] }; var result = JSON.stringify(obj); document.write("parsed object = " + result); </script> Output: parsed object = { "company":"GeeksforGeeks", "courses":["DSA","Web Tech","Placement_Preparation","DDA"] } Comment More infoAdvertise with us Next Article How to parse JSON object using JSON.stringify() in JavaScript ? V vishalkumar98765432 Follow Improve Article Tags : JavaScript Web Technologies JSON JavaScript-Questions Similar Reads How to JSON Stringify an Array of Objects in JavaScript ? In JavaScript, the array of objects can be JSON stringified for easy data interchange and storage, enabling handling and transmission of structured data. The below approaches can be utilized to JSON stringify an array of objects.Table of ContentUsing JSON.stringify with a Replacer Function Using a C 3 min read Convert JSON String to Array of JSON Objects in JavaScript Converting a JSON string to an array of JSON objects in JavaScript involves transforming a structured text format (JSON) into a usable JavaScript array. This allows developers to work directly with the data, enabling easier manipulation, analysis, and display of information.Below are some common met 3 min read How to Pretty Print JSON String in JavaScript? To pretty print JSON, you can format JSON strings with proper indentation, making them easy to read and debug. In JavaScript, you can achieve this using JSON.stringify() with optional parameters to specify the indentation level.Pretty printing JSON adds line breaks and spaces for readability.It is c 3 min read How to send a JSON object to a server using Javascript? JavaScript Object Notation (JSON). It is a lightweight data transferring format. It is very easy to understand by human as well as machine. It is commonly used to send data from or to server. Nowadays it is widely used in API integration because of its advantages and simplicity.In this example we ar 2 min read How to Convert JS Object to JSON String in JQuery/Javascript? Converting a JavaScript object to a JSON string means using the JSON.stringify() method to transform the object into a JSON-formatted string. This allows for efficient data storage, transmission, and debugging by representing complex data structures in a standardized text format.To Convert JS Object 4 min read Like