Answers for "nodejs put array in file"

0

nodejs put array in file

require('fs').writeFile(

    './my.json',

    JSON.stringify(myArray),

    function (err) {
        if (err) {
            console.error('Crap happens');
        }
    }
);
Posted by: Guest on September-30-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language