Using Httparty, I get the following response
@parsed_reponse = > {"items" => {"@no" => "1", "@type" => "book", "@category" => "GENERAL" }}
when i use the following code to access @no
, I am getting the
following error: "Can't convert String into Integer"
r = @response.parsed_response["items"]["@no"]
Can anyone help on this? I do get "Can't convert String into Integer" or "Undefined method `[]' for nil:NilClass (NoMethodError)"
Can anyone explain this with an example?