I have a situation where records in Mongo DB are similar:
{
"_id" : "xxxx",
"_class" : "xxxx",
"orgId" : xxx,
"targetKeyToOrgIdMap" : {
"46784_56139542ecaa34c13ba9e314" : 46784,
"47530_562f1bc5fc1c1831d38d1900" : 47530,
"700004280_56c18369fc1cde1e2a017afc" : 700004280
},
}
I need to find out the entries where the child nodes of targetKeyToOrgIdMap have a specific set of values. This means that I know what value will be in the entry in "46784_56139542eca34c13ba9e314": 46784 . And the field name is a variable, its combination of value and some random string.
In the above example, I have 46784, and I need to find all the records that have 46784 in this corresponding field.
Is it possible to somehow run some regular expression or something like that or using any other value when I get records that have the value that I need in the child nodes of the targetKeyToOrgIdMap field.