Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

read json from file js

const fs = require('fs');

fs.readFile('./customer.json', 'utf8', (err, jsonString) => {
  if (err) {
    console.log("File read failed:", err)
    return 
  }
  console.log('File data:', jsonString)
})
Source by medium.com #
 
PREVIOUS NEXT
Tagged: #read #json #file #js
ADD COMMENT
Topic
Name
8+3 =