i have following bson data in mongoDB
{
[
{
partyName : "p1",
poNumber : "789",
},
{
partyName : "p2",
poNumber : "700",
},
{
partyName : "p3",
poNumber : "889",
}
]
}
i want object from partyName for example if partyName is p1 then i want this
{
partyName : "p1",
poNumber : "789",
}
i searched on the internet but not find relative result, all i found that query.elemMatch may help but i don't know how to use it please help me with the solution ( i want to use only mongoose )