Skip to content
Related Articles
Get the best out of our app
GeeksforGeeks App
Open App
geeksforgeeks
Browser
Continue

Related Articles

JavaScript JSON Complete Reference

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

JSON or JavaScript Object Notation is a format for structuring data. Like XML, it is one of the ways of formatting the data, such format of data is used by web applications to communicate with each other.

Syntax:

JSON function()

Example: The example of the JSON parse() Method.

Javascript




let obj = JSON.parse('{"var1":"Geeks", "var2":"forGeeks!"}');
console.log(obj.var1 + "" + obj.var2);

Output:

GeeksforGeeks!

The complete list of JavaScript JSON methods are listed below:

JavaScript JSON Methods

Method

Description

Example

parse()JSON format and return a JavaScript object.
stringify() It creates a JSON string out of it.
My Personal Notes arrow_drop_up
Last Updated : 25 May, 2023
Like Article
Save Article
Similar Reads
Related Tutorials