arr-obj-keys

Get the keys of an array of objects

Usage no npm install needed!

<script type="module">
  import arrObjKeys from 'https://cdn.skypack.dev/arr-obj-keys';
</script>

README

arr-obj-keys Build Status

Get the keys of an array of objects

Install

$ npm install --save arr-obj-keys

Usage

var arrObjKeys = require('arr-obj-keys');

arrObjKeys([{
    cat: 'meow'
}, {
    foo: 'bar'
}, {
    unicorn: 'foo'
}, {
    cat: 'meow'
}]);
//=> ['cat', 'foo', 'unicorn', 'cat']

API

arrObjKeys(array)

array

Required
Type: array

An array of objects with the keys you want to get.

License

MIT © Kevin Martensson