I'm looking at extracting keys from an Object and push them to an array in Javascript (Nodejs). An example would be:
var obj = [{tag: 'ft001', addr: 'DB415.DBD2'}, {tag: 'ft001', addr: 'DB415.DBD6'}];
function extractKey(arr, keyName) {
// Result: ['ft001', 'ft002'];
}
How would I go about doing this?