title: Javascript: push new array if at least one value is unique
body: <p>I have a grid data and I push new data to him. The new data must contain at least one value to be different.</p>
  
  <p>I've try this:</p>
  
  <pre><code>vm.checkUnique = function () {
      var gridData = vm.sanctionReferencesGridOptions.data;
      var formData = vm.editableGrid.newRowForm;
      for (var i = 0; i &lt; gridData.length; i++) {
          var rowData = gridData[i]
          for (var key in rowData) {
              console.log('rowData: ' + key);
              for (var formKey in formData) {
                  console.log('formKey: ' + formKey);
              }
          }
      }
  }
  
  vm.sanctionReferencesGridOptions.data = [
      {
          "code": 1111,
          "listName": "List 1",
          "sinceDate": "2017-08-23",
          "endDate": "2017-08-23"
      }, {
          "code": 2222,
          "listName": "List 2",
          "sinceDate": "2017-08-23",
          "endDate": "2017-08-23"
      }
   ]
  
  vm.editableGrid.newRowForm = {
      code: "1111", 
      listName: "List 1", 
      sinceDate: "2017-08-23", 
      endDate: "2017-08-23"
  }
  </code></pre>
  
  <p>So in this example I must show an error message with duplicated row data..</p>
  
  <p>Thanks for any help!</p>