Json Data, stringfy, parse

937 0 0 0

Last Updated : 2024-03-29 00:30:55

IN javascript you can convert js data such as array into JSON using JSON.stringfy() , and back from JSON to js array using JSON.Parse, Here is the syntax :


  • JSON.stringfy() Create JSON data from a JS array
    const myArr = ['one', 'two', 'three'];
    console.log(myArr);

    const myArrJson = JSON.stringify(myArr);
    console.log(myArrJson);


Mohammed Anwar

Mohammed Anwar

Experienced technical lead PHP, MySQL and Laravel Developer for 15+ years, with proven ability to develop and create high-quality and optimized web applications. Great ability to build and optimize database design, schema and queries. Versed programing trainer and instructor delivering web courses and helping others to get into the field in a timely manner. Fast and eager learner for new technologies .