title: Ruby On Rails : create nested Array
body: <p>I'm trying to make an array of objects, let's call it "categories", and I want each object in this array to have an array called "items" within it, so the result will be something like this:</p>
  
  <pre><code>[category:id=11, name="beer", items[1,2,3,4]]
  </code></pre>
  
  <p>I've tried this code:</p>
  
  <pre><code>@category ||= Array.new
  @categoryItems ||= Array.new
  @venues.categories.enabled.each do |category|
    @category.push(category)
    @categoryItems.push(category.items.enabled)
  end
  </code></pre>
  
  <p>but I don't know how to name the items inside so I can use them in json afterward. How can I do this?</p>