I have a function return_summoner_champion_list(name) that will return the following JSON data when called
[
{
"id"=>"1",
"name"=>"A"
},
{
"id"=>"2",
"name"=>"B"
},
and so on...
]
How do I iterate through the JSON array and print out all ids?
I tried
return_summoner_champion_list(name).each do |list|
puts list["id"]
end
but it still returns the same JSON data as above without any changes.