I have an array multidimensional that contains two nested arrays.
Looks like this:
$scope.multidimensionalArray = [{
id:1,
name:"John",
....
nestedArray1:[{
importantKey1:"important_data1",
....
nestedArray2:[{
importantKey2:"important_data2",
....
}
]},
....
]}];
How can transform this multidimensional array in one dimensional that have to look like this:
$scope.oneDimensional = [
{
id:1,
name:"John",
importantKey1:"important_data1",
importantKey2: "important_data2",
....
},
....
];