Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

javascript readfile

let fs = require('fs');
let filename = '/path/to/File.json';
fs.readFile(filename, 'utf8', function (err, data) {
	
  	// if an error occurs
  	if(err) throw err;
  
  	console.log(data);
}
Comment

PREVIOUS NEXT
Code Example
Javascript :: how to get a random element of an array javascript 
Javascript :: unix time to date javascript 
Javascript :: separate digits in javascript 
Javascript :: remove null from array javascript 
Javascript :: get selected text of html dropdown in javascript 
Javascript :: remove decimals javascript 
Javascript :: reactdom is not defined 
Javascript :: get first 10 items of array javascript 
Javascript :: check if letter is uppercase javascript 
Javascript :: track window size js 
Javascript :: js get home url 
Javascript :: expo build android 
Javascript :: remove non prime numbers js 
Javascript :: unsafe value used in a resource URL context 
Javascript :: regex find lines containing two strings 
Javascript :: kendo angular grid date format 
Javascript :: socket io esm 
Javascript :: random boolean javascript 
Javascript :: verify radio checked jquery 
Javascript :: sequelize order includes 
Javascript :: upload file using ajax 
Javascript :: replace all words in string jquery 
Javascript :: get input value jquery 
Javascript :: how to get iso date with moment 
Javascript :: jquery in checkbox checked 
Javascript :: javascript regex number 
Javascript :: delete empty values from object js 
Javascript :: javascript get all script tags on page 
Javascript :: pattern telefone js 
Javascript :: aos react 
ADD CONTENT
Topic
Content
Source link
Name
7+1 =