Hi
I am trying to read about json output , buts its getting little bit of
hard

url = "http://xxxxxxx:111/v1=rebuild"
resp = Net::HTTP.get_response(URI.parse(url))
data = resp.body
puts data      =:::::::::::
{"BD51-5":276611,"TOTAL":1459071,"BD51-10":1182460}
result = JSON.parse(data)
puts result =:::::::::::::: BD51-101182460TOTAL1459071BD51-5276611

Basically,

I want to see, if the output of "result" or "data"  has BD51-5   or not
. ( or the search could be, if BD51-11 is there or not )


i know that JSON.parse puts everything as key->value .. but problem is,
I dont know the key of hash...

how can i get what i want to ?
Thanks for your help

-- 
Posted via http://www.ruby-forum.com/.