🌳 Create an array of key paths from an object.
import objectDotKeys from 'object-dot-keys';
objectDotKeys({}, 'separator');
import objectDotKeys from 'object-dot-keys';
const obj = {
a: { b: 'c' },
b: [{ c: 'a' }, { c: 'b' }, { c: 'c' }]
};
objectDotKeys(obj) // ['a.b', 'b.0.c', 'b.1.c', 'b.2.c']
objectDotKeys(obj, { separator: '_' }); // ['a_b', 'b_0_c', 'b_1_c', 'b_2_c']
objectDotKeys(obj, { array: false }); // ['a.b', 'b']