A site I am working on will require a list of makes (car manufacturers) listed in one column, the models of that specific make appear in the column to the right of it when a make is clicked, and will then proceed to list the details for available cars of that model in a div on the right-hand side. The majority of that code is completed, however I've needed to change my array from one filled with object literals to having an array with object literals within an array. Below is the code that I have been trying to work out (the arrays only, I can handle the rest of it) and I just can't figure out what to do to get it right.
Any help would be greatly appreciated.
<div id="test"></div>
<script type="text/javascript">
var inv=new Array();
inv["ASTON MARTIN"]=new Array(
["DBS"]=new Array(
{"year":2009;"price":"$191,400"},
{"year":2006,"price":"$160,000"});
["DB5"]=new Array(
{"year":2000,"price":"$80,500"},
{"year":1996,"price":"$100,600"});
);
document.getElementById('test').innerHTML = inv["ASTON MARTIN"]["DBS"][1].price;
</script>