Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

read json file into object javascript

fs.readFile(filePath, function (error, content) {
    var data = JSON.parse(content);
    console.log(data.collection.length);
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #read #json #file #object #javascript
ADD COMMENT
Topic
Name
5+5 =