From: 7stud -- Date: 2012-09-24T07:30:23+09:00 Subject: Re: How to parse a json output > {"BD51-5":276611,"TOTAL":1459071,"BD51-10":1182460} > I want to see, if the output of "result" or "data" has BD51-5 > or not > but problem is, I dont know the key of hash... BD51-5 is the key: require 'json' body =<276611, "TOTAL"=>1459071, "BD51-10"=>1182460} if my_hash.has_key?("BD51-5") puts "Yes" end --output:-- Yes -- Posted via http://www.ruby-forum.com/.