title: Remove items from Knockout observable array
body: <p>I have the below structure for knockout model. It contains an observable array which in turn contains an object.</p>
  
  <pre><code>   function ViewModel() {
      var self = this;
  
      self.newItem = ko.observable({        
          manufacturer: ko.observable(),
          itemnumber: ko.observable(),
          itemDescription: ko.observable()    
  
      });
      self.AllItems = ko.observableArray();      
  
      self.addItem = function() { 
       self.newItem().manufacturer("test");    
       self.newItem().itemDescription("data");
  
      self.AllItems.push(self.newItem); 
  
      };
      self.removeItem = function(data) { 
          self.AllItems.remove(data);
      };
  }
  </code></pre>
  
  <p>First issue:Through this script I am entering a new itemnumber in the textbox and then clicking on add item to have the new item with the itemnumber from the textbox added to the observable array but when I change the item number and hit add it changes all the itemnumber inside the array. How can i have unique data inside the array.</p>
  
  <p>Second issue: I need to remove the specific items from the array but it's not deleting it. Can someone please tell me how I can delete items from the observable array based on say the itemnumber property.</p>
  
  <pre><code>&lt;input type="text" data-bind="value: newItem().itemnumber"/&gt;
  &lt;div&gt;
      Items: &lt;button data-bind="click: addItem"&gt;Add Item&lt;/button&gt;
  &lt;/div&gt;
  &lt;div&gt;
      &lt;table&gt;
          &lt;tbody data-bind="template: { name: 'itemTemplate', foreach: AllItems }"&gt;&lt;/tbody&gt;
      &lt;/table&gt;
  &lt;/div&gt;
  &lt;script type="text/html" id="itemTemplate"&gt;
      &lt;tr&gt;
          &lt;td&gt;
              &lt;input data-bind="value: itemnumber" /&gt;
              &lt;a href="#" data-bind="click: $parent.removeItem"&gt;Remove Item&lt;/a&gt;
          &lt;/td&gt;
      &lt;/tr&gt;
  &lt;/script&gt;
  </code></pre>
  
  <p>I have created this fiddle for quick view of the issue. Just started learning knockout so any help is appreciated.</p>
  
  <p><a href="http://jsfiddle.net/N3JaW/138/" rel="nofollow">http://jsfiddle.net/N3JaW/138/</a></p>