Suppose we have two observables
student$ = from([
{id: 1, name: "Alex"},
{id: 2, name: "Marry"},
])
address$ = from([
{id: 1, location: "Chicago", sid: 1},
{id: 2, location: "Florida", sid: 2},
])
I want to combine them into a array of object, the expected result would be following
studentAddress = [
{
id: 1,
name: "Alex",
address: [
{id: 1, location: "Chicago", sid: 1},
]
},
{
id: 2,
name: "Marry",
address: [
{id: 2, location: "Florida", sid: 2},
]
},
]