Skip to content

Instantly share code, notes, and snippets.

Created November 26, 2015 00:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/5bf245bb7d69303f6ee1 to your computer and use it in GitHub Desktop.
Save anonymous/5bf245bb7d69303f6ee1 to your computer and use it in GitHub Desktop.
myarr = []
myarr << { "name" => "Bill", "user" => {"links"=>{"self"=>"http://domain.com/104396235"}} }
myarr << { "name" => "Jim", "user" => {"links"=>{"self"=>"http://domain.com/1234582394"}} }
myarr.select { |my| my["user"]["links"]["self"].split("/").last == 104396235 }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment