import * as _ from 'lodash'; const objectMap = {'key1': 'value1', 'key2': 'value2'}; const allKeys = _.keys(objectMap); //Returns a string[]. Here it will be ['key1','key2'];
var object = { 'a': [{ 'b': { 'c': 3 } }] }; _.get(object, 'a[0].b.c');// => 3 _.get(object, ['a', '0', 'b', 'c']);// => 3 _.get(object, 'a.b.c', 'default');// => 'default'