title: JavaScript Multiple Arrays in Object
body: <p>I'm trying to display all of the items in my list below. I organized them as such in order to filter them out.</p>
  
  <p>For example, I want all the titles to be separate from the array items they contain (so that the titles will display as headers and the items as regular text. </p>
  
  <p>Here is my code so far:</p>
  
  <pre><code>var general = { 
      "Hardcover" : { 
          ["Book A",4],
          ["Book B",6],
          ["Book C",5]
      }
      // ... other options 
  };
  
  for (var title in general) {
     var title = ...; // assign the title variable
     $('body').append("&lt;h2&gt;" + title + "&lt;/h2&gt;");
     for(var items in title) {
        // assign item variables separately 
        var itemTitle = ...;
        var itemPrice = ...;
        $('body').append(itemTitle + ": $" + itemPrice);
     }
  }
  </code></pre>
  
  <p>So the final output would look something like:</p>
  
  <h2>Hardcover</h2>
  
  <p>Book A: $4<br>
  Book B: $6<br>
  Book C: $5<br></p>
  
  <p>I made a quick fiddle below with my full list:
  <a href="http://jsfiddle.net/gekp6q8y/1/" rel="nofollow">http://jsfiddle.net/gekp6q8y/1/</a></p>