I have this multiple array and i want to convert it to one array with javascript codes and get data from it with flatMap:
[
{
id: '46892319372',
user_name: 'testerOne',
identifier: '20202'
}
]
[
{
id: '15243879678',
user_name: 'testerTwo',
identifier: '20201'
}
]
[
{
id: '02857428679',
user_name: 'testerThree',
identifier: '20203'
}
]
[
{
id: '65284759703',
user_name: 'testerFour',
identifier: '20204'
}
]
i want to convert this multiple arrays to just one array like this with javascript: I have only one variable that contains this ↓ or maybe more than 4 or less than 4 i don't know i just have a variable that contains the arrays like this in it and i can't put these to another variable or separate them with , or ... i just have this ↓
[
{
id: '46892319372',
user_name: 'testerOne',
identifier: '20202'
},
{
id: '15243879678',
user_name: 'testerTwo',
identifier: '20201'
},
{
id: '02857428679',
user_name: 'testerThree',
identifier: '20203'
},
{
id: '65284759703',
user_name: 'testerFour',
identifier: '20204'
}
]
I tried array.concat but i have only one variable with that arrays so i tried list.concat(list)
but i got something like this as result :
[
{
id: '46892319372',
user_name: 'testerOne',
identifier: '20202'
},
{
id: '46892319372',
user_name: 'testerOne',
identifier: '20202'
}
]
[
{
id: '15243879678',
user_name: 'testerTwo',
identifier: '20201'
},
{
id: '15243879678',
user_name: 'testerTwo',
identifier: '20201'
}
]
[
{
id: '02857428679',
user_name: 'testerThree',
identifier: '20203'
},
{
id: '02857428679',
user_name: 'testerThree',
identifier: '20203'
}
]
[
{
id: '65284759703',
user_name: 'testerFour',
identifier: '20204'
},
{
id: '65284759703',
user_name: 'testerFour',
identifier: '20204'
}
]