How might I extract the property values of a JavaScript object into an array?
Using underscore:
var dataArray = _.values(dataObject);
var dataArray = Object.keys(dataObject).map(function(k){return dataObject[k]});
var dataArray = [];
for(var o in dataObject) {
dataArray.push(dataObject[o]);
}
ES6 version:
var dataArray = Object.keys(dataObject).map(val => dataObject[val]);