dropkey
From each object in an array, delete keys specified
example
var dk = ;var a = item_id : 1 name : 'test1' item_id : 2 name : 'test2' ; console; //[{ name : 'test1' }, { name : 'test2' }]
api
dropkey(objectArray, keyArray)
- objectArray: [Array] - an array containing objects to process
- keyArray: [Array] - an array of strings containing the keys to delete from the objects in objectArray
additional info
There's nothing magical about this. This is just a module for this small snippet of code:
{ array; return array;}
license
MIT