title: I need my API to print a list of titles as well as a full description. I am having trouble getting a list of titles. Any advice?
body: <pre class="lang-rb prettyprint-override"><code>class RecipePuppyAPI1
        URL = &quot;http://www.recipepuppy.com/api/&quot;
  
      def get_recipes
       uri = URI.parse(URL)
        response = Net::HTTP.get_response(uri)
         JSON.parse(response.body)
      end
  
      def recipe_titles(json)
       recipes = []
        json.collect do |recipe|
          recipes &lt;&lt; recipe[&quot;title&quot;]
      end
    end
  end
  
  recipes = RecipePuppyAPI1.new.get_recipes
  puts ap recipes.uniq
  </code></pre>