Syntax
JavaScript Parse JSON Syntax
In JavaScript, parse json: converts a JSON string to an object — JSON.parse(text)
Quick Answer
- Syntax
JSON.parse(text)
JavaScriptSyntax
Parse JSON
Code example
JSON.parse(text)
Converts a JSON string to an object.
How to parse json in JavaScript
- Open your JavaScript file or editor.
- Copy the example, then replace its sample names and values for your code.
JavaScript Parse JSON Syntax
Use JSON.parse(text).
Related Syntax References
Frequently asked questions
What is the JavaScript syntax for parse json?
Use this pattern: JSON.parse(text)
Can I copy this JavaScript code example?
Yes. Use Copy code and adapt the example to your program.
Is this JavaScript syntax different on Mac or Windows?
No. The language syntax is the same across operating systems.
Official source · How we verify