I have the following structure:
const array = [
[
[
[
[
{
'name':'John'
}
],
{
'name':'Mary'
}
],
{
'name':'Cris'
}
],
{
'name':'Deen'
}
],
{
'name':'Bob'
}
]
And I'd like to get the following structure as a result:
const expect = [
{
'name':'John'
},
{
'name':'Mary'
},
{
'name':'Cris'
},
{
'name':'Deen'
},
{
'name':'Bob'
},
]
How do I make such conversion with lodash
or another library?