title: Convert JSON data to array in JavaScript
body: <p>My json data is like that:</p>
  
  <pre><code>[{"vehicleType":"car","make":"Dodge","model":"Durango","vin":"R90N8E95UB"},
  {"vehicleType":"car","make":"Honda","model":"Accord","vin":"XJLSXU6NA5"},
  {"vehicleType":"car","make":"Dodge","model":"Durango","vin":"2UNHFBCQG0"},
  {"vehicleType":"car","make":"Volvo","model":"XC90","vin":"J37612ZVEC"},
  {"vehicleType":"car","make":"Mercedes","model":"C250","vin":"J5QB24CFGS"},
  {"vehicleType":"car","make":"Dodge","model":"Durango","vin":"OB60BC33LF"},
  {"vehicleType":"car","make":"Volvo","model":"XC90","vin":"DCA3364SGK"},
  {"vehicleType":"car","make":"Volvo","model":"XC60","vin":"FV2HML056G"},
  {"vehicleType":"car","make":"BMW","model":"328xi","vin":"IGPP3DQ4SK"},
  {"vehicleType":"car","make":"Mercedes","model":"C250","vin":"J5QB24CFGS"},
  {"vehicleType":"car","make":"Honda","model":"Accord","vin":"XJLSXU6NA5"},
  {"vehicleType":"car","make":"Mercedes","model":"C250","vin":"J5QB24CFGS"},
  {"vehicleType":"car","make":"Dodge","model":"Durango","vin":"R90N8E95UB"}]
  </code></pre>
  
  <p>Now I want my array to be like this in JavaScript:</p>
  
  <pre><code>// Javascript array
  var array = [];
  array[// vin number od above json array] = // the whole row of that vin number.
  </code></pre>
  
  <p>For example., </p>
  
  <pre><code>// Javascript array
  array["R90N8E95UB"][0] 
  =[{"vehicleType":"car","make":"Dodge","model":"Durango","vin":"R90N8E95UB"}]
  array["R90N8E95UB"][1] 
  =[{"vehicleType":"car","make":"Dodge","model":"Durango","vin":"R90N8E95UB"}]
  </code></pre>
  
  <p>And so on...</p>
  
  <p>Please advice on it.</p>
  
  <p>Thank you.</p>