Read and parse JSON in JavaScript

visibility 61 access_time 3 years ago languageEnglish timeline Stats
timeline Stats
Page index 0.06

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.

Please log in or register to comment.

account_circle Log in person_add Register

Log in with external accounts

More from Kontext
Bootstrap 5 Masonry Cards Layout
visibility 2,687
thumb_up 1
access_time 9 months ago
Bootstrap 5 Masonry Cards Layout
GulpUglifyError: unable to minify JavaScript
visibility 702
thumb_up 2
access_time 13 months ago
Download Google Fonts via Gulp
visibility 443
thumb_up 0
access_time 2 years ago