Object.keys(obj) returns an array of a given object's keys.
Object.keys(obj)
var obj = { a: "hello", b: "this is", c: "javascript!" }; var keys = Object.keys(obj); console.log(keys); // ["a", "b", "c"]