Ruby on Rails JSON support is provided using ActiveSupport :: JSON, but it spins the JSON stone behind the scene. Therefore, you can choose your choice.
Check out this example,
@data = [{"id":"7354857336","owner":"49091484@N07","secret":"dc7ce98bf9","server":"8151","farm":9,"title":"01_resize","ispublic":1,"isfriend":0,"isfamily":0},
{"id":"7355453164","owner":"41440187@N07","secret":"b0bc716ee6","server":"7225","farm":8,"title":"{Laduree Macaroons} explore #2","ispublic":1,"isfriend":0,"isfamily":0},
{"id":"7355183126","owner":"38937613@N03","secret":"c342e37a57","server":"7232","farm":8,"title":"REFLECTED AT MIDNIGHT [EXPLORED]","ispublic":1,"isfriend":0,"isfamily":0}]
In the .erb file
<% @data.each do |photo| %>
<%= photo.id%> ---<%= photo.title %><br></br>
<% end %>
source
share