I have few JSON documents stored in MongoDB that are basically error reports, i.e. each document contains a nested data structure mismatches between datasets. They look like the following:
{
"nodename": "BLAH"
"errors": {
"PC": {
"value": {
"PC93196": [
"post",
"casper"
],
"PC03196": [
"netdb"
]
}
}
}
}
So in the above case, a process/tool determines the PC
value of PC93196
and PC03196
. netdb
in this case reported a different PC value to that of post
and casper
.
How do I query for all documents that have errors where the process/tool casper
is involved?