title: KnockoutJs: dataObject is not defined
body: <p>I have a simple WebApi project to manipulate returned data in various format. I am trying to use KnockoutJs to consume the data at the front end but I am having a variable not defined error that I can't seem to understand why. Below is the simple code I am working on. Please feel free to point out the errors. Thanks</p>
  
  <p>Controller formats</p>
  
  <pre><code>[httpGet]
  public Object Data
  {
    return new {
     Time: DateTime.now,
     Text: "&lt;b&gt;Salut&lt;/b&gt;",
     Count: 1
    };
  }
  </code></pre>
  
  <p>JS front end</p>
  
  <pre><code>&lt;script&gt;
      $(document).ready(function(){
      $.ajax("/api/formats", {
         success: function(data){
            dataObject = ko.observable(data);
            ko.applyBindings();
         }
      };
   });
  </code></pre>
  
  <p></p>
  
  <p>HTML</p>
  
  <pre><code>    &lt;tbody&gt;
         &lt;tr&gt;
           &lt;td&gt;Time&lt;/td&gt;
           &lt;td data-bind="text: dataObject().Time"&gt;
           &lt;td&gt;Text&lt;/td&gt;
           &lt;td data-bind="text: dataObject().Text"&gt;
        &lt;/tr&gt;
     &lt;/tbody&gt;
  </code></pre>