how to merge array of this in react or javascript..can anyone help me with this i want the output something like..all the test array should be in one array...coz i need to find the minimum price and plus i need to show the mapping in ascending order
array :[
{
id:0,
name:'something',
test: [
{
id: 0,
test_name:'blood',
price:'200',
},
{
id:1,
test_name:'kidney',
price:'300',
}
]
},
{
id:1,
name:'something1',
test: [
{
id: 0,
test_name:'blood2',
price:'100',
},
{
id:1,
test_name:'kidney2',
price:'100',
}
]
}
]