title: Knockout.js - ko.mapping.fromJS - Visible Binding not updating
body: <p>I am working on a website that updates values on the page every 5 seconds, it calls to a remote database and returns a MVC model through a Get Json call, and call</p>
  
  <p><code>viewModel = ko.mapping.fromJS(model)</code>.</p>
  
  <p>I am then updating this view model every 5 seconds using another Get call and call this mapping call then</p>
  
  <pre><code> viewModel = ko.mapping.fromJS(model, viewModel). 
  </code></pre>
  
  <p>The bindings are correct on my HTML elements as the original model that is retrieved from the database is displayed on the screen but then when the IsVisible property on the model nothing happens, ie the table row should be set to invisible, and another should be set to visible. </p>
  
  <p>On each update the model should be different, with rows set to visible or invisible along with other span's text updating, this part is working, and updates are showing on the page, just the visibility is not changing. </p>
  
  <p>HTML exert of the visible invisible problem, with Javascript of the update call.</p>
  
  <p>All variables from the Model are correctly called I cannot post the model up for the public. </p>
  
  <pre><code>&lt;table class="SelectionTable" cellpadding="0" cellspacing="0"&gt;
      &lt;tbody data-bind="foreach: { data: markets.Selections, as: 'selections' }"&gt;
         &lt;tr class="Selection"&gt;
            &lt;td&gt;&lt;span data-bind='text: selections.Number, visible: selections.IsVisible'&gt;&lt;/span&gt;&lt;/td&gt;
            &lt;td&gt;&lt;span data-bind='text: selections.Name, visible: selections.IsVisible'&gt;&lt;/span&gt;&lt;/td&gt;
            &lt;td&gt;&lt;span data-bind='text: selections.CurrentPrice, visible: selections.IsVisible'&gt;&lt;/span&gt;&lt;/td&gt;
            &lt;td&gt;&lt;span data-bind='text: selections.OpeningPrice, visible: selections.IsVisible'&gt;&lt;/span&gt;&lt;/td&gt;
         &lt;/tr&gt;
      &lt;/tbody&gt;
  &lt;/table&gt;
  
  &lt;script type="text/javascript"&gt;
      var viewModel;
      var self;
  
      var getUpdates = setInterval(function () {
          $.getJSON(
              "/Home/Get", {},
              function (model) {
                  viewModel = ko.mapping.fromJS(model, viewModel);
              });
      }, 5000);
  
      $(document).ready(
          function () {
              $.getJSON(
                  "/Home/Get", {},
                  function (model) {
                      viewModel = ko.mapping.fromJS(model);
                      bindViewModel();
                  });
          });
  
      function bindViewModel() {
          ko.applyBindings(viewModel);
      }
  &lt;/script&gt;
  </code></pre>