Is it currently possible to search an array of BSON::OrderedHashes with Mongoid based objects? One of my attributes, let's call it foo
in the bar
class, looks something like the following:
[#<BSON::OrderedHash:0x7f0 {"id"=>"4bf58dd8d48988d118951735", "name"=>"Grocery or Supermarket", "pluralName"=>"Grocery or Supermarkets", "shortName"=>"Grocery Store", "icon"=>#<BSON::OrderedHash:0x7f2 {"prefix"=>"https://foursquare.com/img/categories/shops/food_grocery_", "sizes"=>[32, 44, 64, 88, 256], "name"=>".png"}>, "primary"=>true}>]
I want to go through all of my objects and find every one that contains Grocery in this order hash for the 'name' attribute.