JavaScript Convert object's values to array


Example

Given this object:

var obj = {
    a: "hello",
    b: "this is",
    c: "javascript!",
};

You can convert its values to an array by doing:

var array = Object.keys(obj)
    .map(function(key) {
        return obj[key];
    });

console.log(array); // ["hello", "this is", "javascript!"]