0.0.45 • Published 8 years ago

keys_deep v0.0.45

Weekly downloads
2
License
ISC
Repository
github
Last release
8 years ago

NPM NPM

returns an array of strings that contains all the keys of the object in the form 'key1', 'obj.key11'.

Usage

var obj = {
  "name": "Jessie J",
  "rating": 69,
  "image_path": "/test.jpg",
  "alternative_name": null,
  "alternative_name2": undefined,
  "obj": {
    "23": {
      "yo": "lol"
    }
  },
  "objectID": "551491260"
}

console.log(keysDeep(a));
/*
[ 'name',
  'rating',
  'image_path',
  'alternative_name',
  'alternative_name2',
  'obj.23.yo',
  'objectID'
]
*/