
JSON.parse() – Parses a JSON string and constructs the JavaScript value or object described by it.
๐ Syntax
JSON.parse(text[, reviver])
๐งช Example
const json = '{"name":"Bob"}';
const obj = JSON.parse(json);
console.log(obj.name);
JSON.parse() – Parses a JSON string and constructs the JavaScript value or object described by it.
JSON.parse(text[, reviver])
const json = '{"name":"Bob"}';
const obj = JSON.parse(json);
console.log(obj.name);
Comments
Post a Comment