I’m new to Ruby on rails and am a bit confused. I have an array of hashes that I parsed through json in a helper:
a = [{"desc"=>"testdesc1", "owner"=>{"url"=>"https://www.example1.com"},
{"desc"=>"testdesc2", "owner"=>{"url"=>"https://www.example2.com"}]
and now I want to display it in my .erb like this:
<h3>name (with link to url)<h3>
<div>desc</div>
I cannot even begin with the first step, which is to parse the array. When I try different variations of the each loop they simply print out the full array.
Is there a straightforward way to do this?
Try this: