Figuring out what Javascript object is this?
<p>I have some script that has the following code:</p>

<pre><code>var result = {
    id:   'test',
    name: 'test',
    home: 'test',
ex_info: [{date: new Date('12-31-2010'), quantity: 976}],
    status: ''
}
</code></pre>

<p>I am trying to insert information in the ex_info property. But I can't add anything. I try to hard to code the following:</p>

<pre><code>var result = {
    id:   'test',
    name: 'test',
    home: 'test',
ex_info: [{date: new Date('03-31-2010'), quantity: 976}, {date: new Date('02-31-2010'), quantity: 543}],
    status: ''
}
</code></pre>

<p>But it results in an error:</p>

<p><em>Update:</em></p>

<p>Error: Expected [ { date : Date(Fri Mar 31 2010 00:00:00 GMT-0500 (EST)), quantity : 976 }, { date : Date(Thu Mar 03 2011 00:00:00 GMT-0500 (EST)), quantity : 543 } ] to equal [ { date : Date(Fri Mar 31 2010 00:00:00 GMT-0500 (EST), quantity : 976 } ]</p>
