title: On click function is called which updates Observable Array, But it is not updating html, in knockoutjs
body: <p>When I search then search string matches the array and whichever items are filtered, will be updated in myArray observableArray and new data should be shown on screen. It is updating within check function but not showing on screen. I checked lot many posts and tried as suggested but it did not work. Please help.</p>
  
  <p>HTML Code:</p>
  
  <pre><code>        &lt;span&gt;Search:&lt;/span&gt;
          &lt;input data-bind='textInput: searchValue' /&gt;
          &lt;input type="button" value="Click" data-bind="click: check" /&gt;
          &lt;p&gt;Listed Values&lt;/p&gt;
          &lt;ul class="list" data-bind="foreach: myArray"&gt;
              &lt;li&gt;&lt;span data-bind="text: $data"&gt;&lt;/span&gt;&lt;/li&gt;
          &lt;/ul&gt;
  </code></pre>
  
  <p>JS file:</p>
  
  <pre><code>function AppViewModel(listValues) {
      this.tempArray = [];
  
      this.listValues =  ["Arnold","Bnolg","Cold"];
      this.myArray = ko.observableArray();
      this.searchValue = ko.observable();
      this.myArray=this.listValues;
      var self =this;
      this.check = function(){
  
          self.myArray=[];
          for(var i=0;i&lt;this.listValues.length;i++){
              var kill = this.searchValue();
              if(this.listValues[i].indexOf(kill) &gt; -1){
                  this.tempArray.push(this.listValues[i]);
              }
          }
          this.myArray=this.tempArray;
      };
  }
  ko.applyBindings(new AppViewModel);
  </code></pre>