Hi
I would like to iterate
@some_value outputs the following result
{"Meta"=>{"Query"=>"java", "ResultOffset"=>"1", "NumResults"=>"1", "TotalResults"=>"21931"}}
i need to retrieve the Value of each individual value for example
java 1 1 21931
Hi
I would like to iterate
@some_value outputs the following result
{"Meta"=>{"Query"=>"java", "ResultOffset"=>"1", "NumResults"=>"1", "TotalResults"=>"21931"}}
i need to retrieve the Value of each individual value for example
java 1 1 21931
There's the each method.
@some_value['Meta'].each do |k, v|
puts v
end
Which will loop through every of your entry and execute the code inside the do/end for every of them.
Here it'll display the value of the element.