Skip to main content
Commonmark migration
Source Link

The easiest way is to just use Underscore.js:

keys

 

_.keys(object) Retrieve all the names of the object's properties.

 

_.keys({one : 1, two : 2, three : 3}); => ["one", "two", "three"]

Yes, you need an extra library, but it's so easy!

The easiest way is to just use Underscore.js:

keys

 

_.keys(object) Retrieve all the names of the object's properties.

 

_.keys({one : 1, two : 2, three : 3}); => ["one", "two", "three"]

Yes, you need an extra library, but it's so easy!

The easiest way is to just use Underscore.js:

keys

_.keys(object) Retrieve all the names of the object's properties.

_.keys({one : 1, two : 2, three : 3}); => ["one", "two", "three"]

Yes, you need an extra library, but it's so easy!

Source Link
samnau
  • 752
  • 8
  • 9

The easiest way is to just use Underscore.js:

keys

_.keys(object) Retrieve all the names of the object's properties.

_.keys({one : 1, two : 2, three : 3}); => ["one", "two", "three"]

Yes, you need an extra library, but it's so easy!