I have a MongoDB collection, and I need to return a field of a document in collection, in which the first field address is equal to the one I give.
This is an example of my Test document
{
"_id": "mtXjL56DgJNiwr6lI5",
"state": {
"label": "disconnected",
}
},
"name": "Hey",
"senders": [
"zAxNarwAE2AnvLA8P",
"me3AWg85YDvWMShKY",
"e3wADkdLDKp5MEKYW",
"4dzdz8Xaw7aQM7ZeW",
],
"hard": "4.8",
}
So when I find zAxNarwAE2AnvLA8P
equal the senders.0
, I'll get all the senders without the first one
"senders": [ "me3AWg85YDvWMShKY", "e3wADkdLDKp5MEKYW", "4dzdz8Xaw7aQM7ZeW", ]