Answers for "json convert string to array"

79

javascript parse json

var jsonPerson = '{"first_name":"billy", "age":23}';
var personObject = JSON.parse(jsonPerson); //parse json string into JS object
Posted by: Guest on July-23-2019
1

Convert json to array

var j = {0: "Hello", 1: " ", 2: "World", 3: "!"};

console.log(Object.values(j))
// Object.values(j) = ["Hello"," ","World","!"]
Posted by: Guest on June-15-2021

Code answers related to "json convert string to array"

Code answers related to "Javascript"

Browse Popular Code Answers by Language