es-toolkit
es-toolkit copied to clipboard
flattenObject doesn't handle array of objects
Given this code
const result = flattenObject({
a: [1, { b: 2 }, 3],
});
expect(result).toEqual({
'a.0': 1,
'a.1.b': 2,
'a.2': 3,
});
nested object is not flattened