'How To Remove Nested Array In React Native
I don't know how to remove the nested array in react native. Example :
Array [
Array [
Array [
"77",
undefined,
"Double Pixel Chart",
"c1",
"Chart",
],
Array [
"78",
undefined,
"Heikin Ashi Chart",
"c2",
"Chart",
],
],
]
What I want is just this array structure :
Array [
"77",
undefined,
"Double Pixel Chart",
"c1",
"Chart",
],
Array [
"78",
undefined,
"Heikin Ashi Chart",
"c2",
"Chart",
],
This is my code for pushing into the array :
for (let menu of response.data.Data) {
apiChartingMenu = new ApiChartingMenuModel (
menu.idx,
menu.shortDescription,
menu.titlecommand,
menu.command,
menu.commandtype,
);
data.push(Object.values(apiChartingMenu));
}
How can I achieve this?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
