If I have many documents (or data objects) stored in MongoLab db similar to:
{"_id":{"$oid":"539467f6e4b02221d856bcd8"},
"Object Type":"Data Object",
"Object Name":"Human",
"Subobject Types":
{"S0":{"User ID":"x"},
"S1":{"Password":"x"},
"S2":{"First Name":"x"},
"S3":{"Middle Name":"x"},
"S4":{"Last Name":"x"},
"S5":{"Cover Name":"x"},
"S6":{"Taxpayer Identification":"x"},
"S7":{"Email Address":"x"},
"S8":{"Smartphone Number":"x"},
"S9":{"Street":"x"},
"S10":{"City":"x"},
"S11":{"State":"x"},
"S12":{"Nation":"x"},
"S13":{"Postal Code":"x"}
}
}
and if I make the following query call to MongoLab db using REST api...
https://api.mongolab.com/api/1/databases/my-db/collections/my-coll?q={}&apiKey=myAPIKey
where q=...
{ "Object Type":"Data Object",
"Object Name":"Human",
"Subobject Types":
{"S0":{"User ID":{}},
"S1":{"Password":{}},
"S2":{"First Name":{}},
"S3":{"Middle Name":{}},
"S4":{"Last Name":{}},
"S5":{"Cover Name":{}},
"S6":{"Taxpayer Identification":{}},
"S7":{"Email Address":{}},
"S8":{"Smartphone Number":{}},
"S9":{"Street":{}},
"S10":{"City":{}},
"S11":{"State":{}},
"S12":{"Nation":{}},
"S13":{"Postal Code":{}}
}
}
...then why would db return nothing even though there are many documents (or data objects above) in db exactly matching above query?
It also returns nothing if I use the $exits query operator where q=
{"Object Type":"Data Object",
"Object Name":"Human",
"Subobject Types":
{"S0":{"User ID":{"$exists":true}},
"S1":{"Password":{"$exists":true}},
"S2":{"First Name":{"$exists":true}},
"S3":{"Middle Name":{"$exists":true}},
"S4":{"Last Name":{"$exists":true}},
"S5":{"Cover Name":{"$exists":true}},
"S6":{"Taxpayer Identification":{"$exists":true}},
"S7":{"Email Address":{"$exists":true}},
"S8":{"Smartphone Number":{"$exists":true}},
"S9":{"Street":{"$exists":true}},
"S10":{"City":{"$exists":true}},
"S11":{"State":{"$exists":true}},
"S12":{"Nation":{"$exists":true}},
"S13":{"Postal Code":{"$exists":true}}
}
}