How to store multiple key value, where value is an array of elements in javascript?
<p>I am looking for a quick way to crate a key values pair in JavaScript, where I have a key it's an ID, like 1, 2, 3, 4, 5, .... 100 and the values are an array composed by a reference, name and quantity. </p>

<p>Is this an appropriate syntax?</p>

<blockquote>
<pre><code>var petfoodRefData = {
    "1": [
            {"ref":5222, "description":"purina", "qtt":500},
            {"ref":5322, "description":"hills", "qtt":500},
            {"ref":6222, "description":"hills junior", "qtt":500}
        ],
    "2": {"ref":8022, "description":"fatcat", "qtt":60}
}
</code></pre>
</blockquote>

<p>Is there an easier better way to do this? I basically want to for every ID = 1 give me all pet food references, and add them to the document.</p>
