title: storing multiple objects using HTML5 indexDB
body: <p>I have JSON object in the below format,</p>
  
  <pre><code>$scope.indexData = {
    "custid": "1",
    "addresses": [
      {
        "addressType": "P",
        "address1": ""
      },
      {
        "addressType": "M"
      }
    ],
    "personalDetails": {
      "title": "",
      "name": ""       
    }
  }
  </code></pre>
  
  <p>I want to store the object using HTML5 indexDB. how do i store the object?</p>
  
  <p>I tried in the following way, but no luck.</p>
  
  <pre><code>var db;
  var request = window.indexedDB.open("newDatabase", 1);
  request.onupgradeneeded = function(event) {
   var db = event.target.result;
          var objectStore = db.createObjectStore("customers");
          for (var i in $scope.indexData) {
                  objectStore.add($scope.indexData[i]);      
          }
  
  }
  </code></pre>
  
  <p>I am getting the following error saying: <code>Uncaught DataError: Failed to execute 'add' on 'IDBObjectStore': The object store uses out-of-line keys and has no key generator and the key parameter was not provided.</code></p>