I have queried the document with length match as:
sample format of document:
{
"_id": {
"$oid": "5e158e2de6facf7181cc368f"
},
"word": "as luck would have it",
}
query as:
{$where: "this.word.length == 20 "}
This matches the below :
{
"_id": {
"$oid": "5e158e30e6facf7181cc3bdb"
},
"word": "adrenocorticotrophic",
}
{
"_id": {
"$oid": "5e158e2ee6facf7181cc38cf"
},
"word": "attributive genitive",
}
But I want to match only adrenocorticotrophic not the word with spaces like attributive genitive
May I know how could I match as above ?
Any help is appreciated !!