{"id":12066,"date":"2022-03-15T18:44:31","date_gmt":"2022-03-15T22:44:31","guid":{"rendered":"http:\/\/local.brightwhiz\/?post_type=snippets&p=12066"},"modified":"2022-03-15T18:44:34","modified_gmt":"2022-03-15T22:44:34","slug":"javascript-parse-json-code","status":"publish","type":"snippets","link":"http:\/\/local.brightwhiz\/snippets\/javascript-parse-json-code\/","title":{"rendered":"JavaScript Parse JSON Code"},"content":{"rendered":"\n
JavaScript parse JSON code example.<\/p>\n\n\n\n
var json = '{ "first_name":"Tommy", "age":46 }';\n\nvar personObject = JSON.parse( json ); \/\/ parse JSON string into JavaScript object\n\nconsole.log( personObject.first_name ); \/\/ Tommy\n\nconsole.log( personObject.age ); \/\/ 46<\/code><\/pre>\n","protected":false},"comment_status":"open","ping_status":"closed","template":"","meta":[],"categories":[953,25,27,15,16,18],"tags":[320,328,334,350,424,544,591,635,638],"yoast_head":"\nJavaScript Parse JSON Code [Snippet]<\/title>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\t\n