title: Datatable update from another component
body: <p>I'm using the datatables table plugin for jquery. I have another component that uses Ajax to retrieve an object from the server. I'd like to update the database with this object. I'm struggling on how to piece this together. The Ajax returns an object that is in the format that the datatable will accept for data. But how can I update the datatable from another components Ajax call? I'm using python flask and jinja2 templating. Here is the javascript as it currently exist:</p>
  
  <pre><code>$(function() {
      var container = document.getElementById('visualization');
      var items = new vis.DataSet({{documents|safe}});
      var options = {};
      var timeline = new vis.Timeline(container, items, options);
  
      timeline.on('select', function (properties) {
          $.getJSON('/getDependencyHistory', {
              uuid: properties.items[0]
          }, function(data) {
              console.log("Place this into the datatable");
          });
          return false;
      });
  });
  
  $(document).ready(function() {
      var table = $('#example').DataTable();
  });
  </code></pre>