I have two collection one is invoice and another one is payment
invoice collection looks like this
{
_id: "123",
client: "ABC"
}
payment collection looks like
{
_id: "456",
invoiceId: "123",
amount: 100
},
{
_id: "789",
invoiceId: "123",
amount: 50
}
i want output like
{
_id: "123",
client: "ABC",
amount: 150
}