is there a \"Nice\" way to get all the values out of a json object (I don\'t care about the keys) - just get the values into array, without using a loop ? (lang is Javascr
With ES2017 you have Object.values(). You can polyfill it also.
Only you need is transform JSON to JavaScript object and call Object.values(). The result is an array of values.
var obj = JSON.parse(jsonData); var result = Object.values(obj);