Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js read from json

const json = '{"result":true, "count":42}';
const obj = JSON.parse(json);

console.log(obj.count);
// expected output: 42

console.log(obj.result);
// expected output: true
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #js #read #json
ADD COMMENT
Topic
Name
8+1 =