Is there a way to dynamically convert an Array of objects into an Array of Arrays?
For example:
arrayTest = arrayTest[10 objects inside this array]
Each object in the array has multiple properties that are added dynamically, so the property names are unknown.
I want to be able to convert this Array of objects into Array of Arrays dynamically.
P.S. I can convert it if I know the property name of the object, but I want to do it automatically without knowing the property names.
Example (assuming firstName and lastName are known property names):
var outputData = [];
for(var i = 0; i < inputData.length; i++) {
var input = inputData[i];
outputData.push([input.firstName, input.lastName]);
}