JS Built-ins
JSONparsebeginner

JSON.parse() β€” object

πŸ“– Usage Example
JSON.parse('{"a":1}')  // β†’ { a: 1 }

JSON.parse() converts a JSON string into a JavaScript object or value.

JSON.parse(text)

JSON.parse(text) parses a JSON string and returns the corresponding JavaScript value.

Challenge: Parse '{"a":1}' and verify the result.

πŸ’‘ Hints (1)
  • β€’ JSON.parse converts a JSON string into a JS value.