Answers for "how to convert json array to string in javascript"

0

js array to json

// Array to JSON:
const jsonString = JSON.stringify(yourArray);
// JSON to Object / Array
const yourData = JSON.parse(jsonString);
Posted by: Guest on February-24-2021
-1

js array to json

var json_arr = {};
        json_arr["name1"] = "value1";
        json_arr["name2"] = "value2";
        json_arr["name3"] = "value3";

        var json_string = JSON.stringify(json_arr);
Posted by: Guest on October-12-2021

Code answers related to "how to convert json array to string in javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language