Get the keys of an array of objects
$ npm install --save arr-obj-keys
const arrObjKeys = require('arr-obj-keys');
arrObjKeys([{
cat: 'meow'
}, {
foo: 'bar'
}, {
unicorn: 'foo'
}, {
cat: 'meow'
}]);
//=> ['cat', 'foo', 'unicorn', 'cat']
Type: Array
An array of objects with the keys you want to get.
MIT © Kevin Mårtensson