This is going to be a silly question, but if I have a Mongo object that is in this format:
{
"url": "google.com",
"statusCode": 301,
"headers": {
"location": "http://www.google.com/",
"content-type": "text/html; charset=UTF-8",
"date": "Fri, 22 Mar 2013 16:27:55 GMT",
"expires": "Sun, 21 Apr 2013 16:27:55 GMT",
"cache-control": "public, max-age=2592000",
"server": "gws",
"content-length": "219",
"x-xss-protection": "1; mode=block",
"x-frame-options": "SAMEORIGIN"
}
}
Using db.collections.find(), how do I find the server key, or any key that is nested within another key?
I have tried db.collections.find({headers:{server:"gws"}})
I have tried quoting them in all possible combinations, but the output has always been blank, or ...
Any suggestions would be appreciated.