hello I am working with collections and arrays in laravel and now I have the following problem: after grouping a data collection I have as a result something like this:
[
[
{
"id":1,
"number":1,
"name":"ACTIVO",
"type":1
},
{
"id":2,
"number":101,
"name":"ACTIVO CORRIENTE",
"type":1
},
],
[
{
"id":7,
"number":2,
"name":"PASIVO",
"type":2
}
]
]
my question is how can I remove (or join) the inner arrays and be left with a single array as follows
[
{
"id":1,
"number":1,
"name":"ACTIVO",
"type":1
},
{
"id":2,
"number":101,
"name":"ACTIVO CORRIENTE",
"type":1
},
{
"id":7,
"number":2,
"name":"PASIVO",
"type":2
}
]
any idea how i could do this?