skip to Main Content

Get an element from an array of objects with an id in mongodb using nodejs and mongoose

I've a many documents like this user:62e13ae4f9a38f7610e70bd7, _id :62e13ae4f9a38f7610e70bdb transactions:{ { "amount": 50, "category": "Bills", "type": "Expense", "date": "2022-01-20T00:00:00.000Z", "_id": "62e13ae4f9a38f7610e70be0" }, { "amount": 100, "category": "Lottery", "type": "Income", "date": "2022-01-20T00:00:00.000Z", "_id": "62e13ae4f9a38f7610e70be1" }, { "amount": 200, "category": "Salary", "type":…

VIEW QUESTION
Back To Top
Search