access_time 3 years ago languageEnglish
more_vert

Read and parse JSON in JavaScript

visibility 29 comment 0

JSON is commonly used in modern applications for data storage and transfers. Pretty much all programming languages provide APIs to parse JSON. 

JSON means JavaScript Object Notation. So of course we can easily parse JSON string in JavaScript.

JSON.parse function can be used to parse JSON in JavaScript.

Code snippet

var json = '{"Name":"A","Value":2}';
jsonObj = JSON.parse(json);
console.log(jsonObj.Name);
console.log(jsonObj.Value);
info Last modified by Raymond 3 years ago copyright This page is subject to Site terms.
Like this article?
Share on

Please log in or register to comment.

account_circle Log in person_add Register

Log in with external accounts

Follow Kontext

Get our latest updates on LinkedIn.

Want to contribute on Kontext to help others?

Learn more