xxxxxxxxxx
<html lang="en">
<head>
<meta charset="utf-8">
<title>Parse JSON String in JavaScript</title>
</head>
<body>
<script>
// Store JSON data in a JS variable
var json = '{"name": "Peter", "age": 22, "country": "United States"}';
// Converting JSON object to JS object
var obj = JSON.parse(json);
console.log(obj);
</script>
<p><strong>Note:</strong> Please check out the browser console by pressing the f12 key on the keyboard.</p>
</body>
</html>