<% resources.each do |resource| %>

<%= resource['name'] %>

<%= render partial: 'resource_explanation', locals: { explanation: resource['explanation'] } if resource['explanation'] %> <% resource['examples'].each do |example| %> <% link = example['link'].gsub('.json', '') %>
<%= render partial: 'example', locals: { example: set_example(link), link: link } %>
<% end %>
<% end %>