What is JSON?

JSON (JavaScript Object Notation) is a light text format for data. It is used by almost all web APIs.

const obj = { name: "Robin", age: 25 };
const text = JSON.stringify(obj);
console.log(text);
console.log(JSON.parse(text).name);

Output:

Tutorials Class - Output Window

{"name":"Robin","age":25}
Robin

Keys and strings must use double quotes. See JavaScript JSON.


Learn more about the similar topics:
Tutorials
No Content Found.
Exercises & Assignments
No Content Found.
Interview Questions & Answers
No Content Found.