JSON.parse

parse — Parses the input as json.

Description

JSON.parse(mixed json)

Parameters

Name Description Type Default Optional
json mixed No

Examples

Example #1 – parse example
console.log(JSON.parse(1.5)); // 1.5 console.log(JSON.parse('{"Hello": "World"}')); // Object {Hello: "World"} console.log(JSON.parse('"String"')); // String

External references