9951 explained code solutions for 126 technologies


nodejsHow to convert JSON to array


const json = {name: 'Joe', age: 98};
const array = Object.values(json);ctrl + c
{name: 'Joe', age: 98}

sample JSON object to convert to array

Object.values(

return all values as array from given object

array

will contain json values list as array