title: Asynchronously remove JSON object from screen
body: <p>I'm trying to create a single-page app that pulls information from a JSON file, displays it on the screen, and perform a few actions. </p>
  
  <p>Right now, I have all of the information being displayed on the screen properly: <a href="http://jsfiddle.net/rcsayf7t/3/" rel="nofollow">http://jsfiddle.net/rcsayf7t/3/</a></p>
  
  <p>I need the "Remove" button to asynchronously remove the JSON object from the screen when it's clicked, but unfortunately have no idea how to go about accomplishing it. </p>
  
  <p><strong>HTML:</strong></p>
  
  <pre><code>&lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th scope="col"&gt;&lt;/th&gt;
              &lt;th scope="col"&gt;Name&lt;/th&gt;
              &lt;th scope="col"&gt;Message&lt;/th&gt;
              &lt;th scope="col"&gt;Date&lt;/th&gt;
              &lt;th scope="col"&gt;&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody class="tweets-result"&gt;&lt;/tbody&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p><strong>jQuery:</strong></p>
  
  <pre><code>// helper function for formatting date
  function formatDate(date) {
      var dateSplit = date.split(" ");
      var displayDate = dateSplit[0] + ", " + dateSplit[1] + " " + dateSplit[2];
  
      // return the result
      return displayDate;
  }
  
  
  $(document).ready(function () {
      // start ajax request
      $.ajax({
          url: "https://gist.githubusercontent.com/arlodesign/7d80edb6e801e92c977a/raw/24605c9e5de897f7877b9ab72af13e5b5a2e25eb/tweets.json",
          dataType: "text",
          success: function (data) {
              // store the JSON data
              var tweetData = $.parseJSON(data);
  
              // loop through json values and build the table
              $.each(tweetData.tweets, function (index, item) {
                  $('.tweets-result').append(
                      '&lt;tr&gt;' +
                      '&lt;td&gt;&lt;img src="' + item.profile_image_url + '" alt="@' + item.screen_name + ' avatar"&gt;&lt;/td&gt;' +
                      '&lt;td&gt;&lt;a href="https://twitter.com/' + item.screen_name + '"&gt;@' + item.screen_name + '&lt;/a&gt;&lt;/td&gt;' +
                      '&lt;td&gt;' + item.text + '&lt;/td&gt;' +
                      '&lt;td&gt;' + formatDate(item.created_at) + '&lt;/td&gt;' +
                      '&lt;td&gt;Remove&lt;/td&gt;' +
                      '&lt;/tr&gt;');
  
                      // WHEN YOU CLICK "REMOVE", THE TWEET SHOULD
                      // ASYNCHRONOUSLY BE REMOVED FROM THE SCREEN
              });
          }
      });
  });
  </code></pre>