I have below function which take result set which has rows(first row is heading) and columns (like dataset in .NET) as input and return output. What output it returns I am not able to understand. I am facing some issues to run Node js app and hence not able to debug it line by line. I really need to understand its purpose.
export const flattenObject = (object) => {
return object.reduce((acc, val) => Array.isArray(val) ?
acc.concat(flattenObject(val)) : acc.concat(val), []);
};
Could someone please help me to get its output/purpose in code. Thanks in advance.