// json object const jsonData = '{ "name": "John", "age": 22 }'; // converting to JavaScript object const obj = JSON.parse(jsonData); // accessing the data console.log(obj.name); // John