Ruby array of hashes find values by key : <p>I have an array like below</p>

<blockquote>
  <p>[{500=>{"id"=>1, "name"=>"Hock Tong Bee Pte Ltd/ Corner stone wines",
  "created_at"=>Thu, 19 Jan 2017 18:10:35 UTC +00:00, "updated_at"=>Thu,
  19 Jan 2017 18:10:35 UTC +00:00, "website"=>nil, "status"=>nil,
  "industry_type_id"=>1, "major_category_id"=>1,
  "minor_category_id"=>75, "save_as_draft"=>false, "company_id"=>1}},
  {600=>{"id"=>2, "name"=>"Continental Wines", "created_at"=>Thu, 19 Jan
  2017 18:10:35 UTC +00:00, "updated_at"=>Thu, 19 Jan 2017 18:10:35 UTC
  +00:00, "website"=>nil, "status"=>nil, "industry_type_id"=>1, "major_category_id"=>1, "minor_category_id"=>75,
  "save_as_draft"=>false, "company_id"=>2}}]</p>
</blockquote>

<p>I have key's like 500/600 from this array i want tot get that object.
I need to write one method, I will pass key only that should return appropriate object. Example if I send key is 500 result should be </p>

<blockquote>
  <p>{"id"=>1, "name"=>"Hock Tong Bee Pte Ltd/ Corner stone wines",
  "created_at"=>Thu, 19 Jan 2017 18:10:35 UTC +00:00, "updated_at"=>Thu,
  19 Jan 2017 18:10:35 UTC +00:00, "website"=>nil, "status"=>nil,
  "industry_type_id"=>1, "major_category_id"=>1,
  "minor_category_id"=>75, "save_as_draft"=>false, "company_id"=>1}</p>
</blockquote>

<p>Anyone have idea on how to achieve this in Ruby?</p>
