i have below mongoDB collection data. i am trying to fetch data using typesOfExicution, companyName and projectName. i have wrote the below query for finding
db.getCollection('SETTINGS').find({'companyName':'VV', 'typesOfExicution' : 'validation', 'automation.projectName' : 'hdh'})
if i don't use automation.projectName i am able to find the data. but if i use this then it is returning 0 records.
so what is the exact query to find data from an Array.
/* 1 */
{
"_id" : ObjectId("5abce315cabca22270eead6a"),
"typesOfExicution" : "validation",
"modesOfExicution" : "auto",
"automation[0][projectName]" : "Second",
"automation[0][modules][]" : "Second module",
"automation[0][assets][]" : "Second assets",
"companyName" : "VV"
}
/* 2 */
{
"_id" : ObjectId("5abce31ccabca22270eead6b"),
"typesOfExicution" : "validation",
"modesOfExicution" : "auto",
"automation[0][projectName]" : "Second",
"automation[0][modules][]" : "Second module",
"automation[0][assets][]" : "Second assets",
"companyName" : "VV"
}
/* 3 */
{
"_id" : ObjectId("5abce321cabca22270eead6c"),
"typesOfExicution" : "validation",
"modesOfExicution" : "auto",
"automation[0][projectName]" : "hdh",
"automation[0][modules][]" : "ds",
"automation[0][assets][]" : "djv",
"companyName" : "VV"
}
