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