I have tested multiple methods from the MongoDB documentation manually, but none of them seem to resolve my issue. Below is a structure of my data for reference:
"loopback": [
{
"_date": "some date",
"dutTestParams": [],
"_id": "5f680665dfbfb74e78cae175",
"paramId": "dummyid",
"jtagApbStatus": "true",
"dutYaml": "dummy_yaml",
"dutSequenceId": "dummy_sequence",
"dutGitVersion": "1.0.1",
"guiVersion": "1.0",
"projectId": "alphacore",
"jobId": "id",
"pvt": "dummypvt",
"rate": 1,
...
My main document contains test data related to the test points and all chips tested within the test.
While filtering the queried data is straightforward, I am seeking advice on making specific queries. Ideally, I want to execute a query like this:
db.testdata.find({jobid:"some id", data.0.chipid:"chip1"})
The goal here is to retrieve the parent header document along with only sub-documents where chipid equals "chip1". However, my attempts fetch all sub-documents instead of just those that match the specified chipid.
If anyone has experience in resolving this issue, your help would be greatly appreciated!