title: Knockout.js: computed observable not updating as expected
body: <p><strong>Edit:</strong> Added code for function populateDropdown and function isSystemCorrect (see bottom)</p>
  
  <p><strong>Edit 2  I have narrowed it down a bit and the problem seems to arise in the arrayFilter function in the computed observable. This returns an empty array, no matter what I try. I have checked that self.testsuites() looks ok right before filtering, but the filtering still fails.</strong></p>
  
  <p>I have a problem with my computed observable, filteredTestsuites.</p>
  
  <p>As you can see from the screendump, the testsuites observable is populated correctly, but the computed observable remains empty. I have also tried choosing another option than "Payment" from the dropdown menu, to see if this will trigger the observable, it did not.</p>
  
  <p>I would think the computed observable would be updated every time self.testsuites() or self.dropdownSelected() was changed, but it doesnt seem to trigger on neither of them.</p>
  
  <p>What am I doing wrong here? </p>
  
  <p>I simply want to make the computed observable filter the testsuites after the chosen dropdown option, every time either of them change.</p>
  
  <p><img src="https://i.stack.imgur.com/MRSF2.png" alt="Screendump from console"></p>
  
  <pre><code>function ViewModel() {
      var self = this;
  
      // The item currently selected from a dropdown menu
      self.dropdownSelected = ko.observable("Payment");
  
      // This will contain all testsuites from all dropdown options
      self.testsuites = ko.mapping.fromJS('');
  
      // This will contain only testsuites from the chosen dropdown option
      self.filteredTestsuites = ko.computed(function () {
          return ko.utils.arrayFilter(self.testsuites(), function (testsuite) {
              return (isSystemCorrect(testsuite.System(), self.dropdownSelected()));
          });
      }, self);
  
      // Function for populating the testsuites observableArray
      self.cacheTestsuites = function (data) {
          self.testsuites(ko.mapping.fromJS(data));
      };
  
  
      self.populateDropdown = function(testsuiteArray) {
  
          for (var i = 0, len = testsuiteArray().length; i &lt; len; ++i) {
  
              var firstNodeInSystem = testsuiteArray()[i].System().split("/")[0];
  
              var allreadyExists = ko.utils.arrayFirst(self.dropdownOptions(), function(option) {
                  return (option.Name === firstNodeInSystem);
              });
  
              if (!allreadyExists) {
                  self.dropdownOptions.push({ Name: firstNodeInSystem });
              }
          }
      };
  }
  
  
  $(document).ready(function () {
  
      $.getJSON("/api/TestSuites", function (data) {
          vm.cacheTestsuites(data);
          vm.populateDropdown(vm.testsuites());
          ko.applyBindings(vm);
      });
  }
  </code></pre>
  
  <p>Function isSystemCorrect:</p>
  
  <pre><code>function isSystemCorrect(system, partialSystem) {
  
      // Check if partialSystem is contained within system. Must be at beginning of system and go
      // on to the end or until a "/" character.
      return ((system.indexOf(partialSystem) == 0) &amp;&amp; (((system[partialSystem.length] == "/")) ||     (system[partialSystem.length] == null)));
  }
  </code></pre>