```
{"_id":{"$oid":"5ee9e17e88adc3a1d6c2a39f"},"title":"test","products":{"car":"yes hello"}}

```

how can I query the documents which have the key car use mongo \_id or mongo?
I tried

```
    irb(main):042:0> x = client[:materials].find({"products.car":{$exists=>true}})
=> #<Mongo::Collection::View:0x47269370736460 namespace='db.materials' @filter={"products.car"=>{nil=>true}} @options={}>
irb(main):043:0> x.count
Traceback (most recent call last):
        1: from (irb):43
BSON::InvalidKey (NilClass instances are not allowed as keys in a BSON document.)

```

and I don't know how to do it with mongo \_id or mongo. and puzzled about the error message