How could I convert the mongoid query into real mongo query js syntax

Viewed 94

I go this query on the console, however I could not simply copy and paste it to execute it in mongo shell.

Is there any method to convert the mongoid DSL into real mongo query statement.

Thanks

database=test collection=flights selector={"$query"=>{"from"=>{:$in=>["TPE"]}, "to"=>{:$in=>["HND", "NRT", "NRT|TYO"]}, "flight_date"=>{"$gte"=>2016-03-15 00:00:00 UTC, "$lt"=>2016-03-16 00:00:00 UTC}, "flight_no"=>{:$exists=>true, :$ne=>nil}, "updated_at"=>{"$gte"=>2016-03-02 09:16:13 UTC}}, "$orderby"=>{"departure_at"=>1}}
1 Answers
Related