I am new to ruby and Mongo and am looking for an answer to this...
I have a mongo database of records that contains records like this - with hashes embedded within hashes embedded within array
{
"id =>1",
"address" =>[
{
"number" => 1404,
"street" =>"jasmine",
"city" => "NY",
"state" => "NY",
"zip" => "02941"
},
{
"number" => 2400,
"street" =>"miner",
"city" => "Boston",
"state" => "MA",
"zip" => "02760"
},
{etc..}
],
"geo" => { "lat" => 33.875, "lon" => -116.301 }
"first_name"=> "joe",
"last_name" => "smith"
}
{
"id" =>"2",
"address" =>[{...},{...}, etc ],
"geo" => {"lat" => 32.875, "lon" => -115.301 },
"first_name"=> "john",
"last_name"=>"doe"
}
and I want to find/return all records that include "street" == "jasmine", how do I reference "street" inside the find criteria?