SyntaxFix
Write A Post
Hire A Developer
Questions
Since I use underscore.js in almost every project, I would use the keys function:
keys
var obj = {name: 'gach', hello: 'world'}; console.log(_.keys(obj));
The output of that will be:
['name', 'hello']