title: Parsing AJAX response in callback
body: <p>I need to access a piece of data from some HTML response in an AJAX callback.</p>
  
  <p>In my Coffeescript, I want to access the completion-id data attribute. When I do the following:</p>
  
  <pre><code>  $('.mark-completed')
      .bind "ajax:success", (event, data) -&gt;
          console.log data
          console.log $(data)
  </code></pre>
  
  <p>I get this in the console for data:</p>
  
  <pre><code>&lt;li class="learning_item_completion" data-completion-id="162" data-user-id="2" id="learning_item_completion_162"&gt;
    &lt;div class="item-icon"&gt;
      &lt;img alt="Thumb_alex_headshot_green_200x200" class="circular" height="60" src="/uploads/user/picture/2/thumb_alex_headshot_green_200x200.png" width="60" /&gt;
    &lt;/div&gt;
    &lt;div class="item"&gt;
  </code></pre>
  
  <p>And this for $(data):</p>
  
  <pre><code>[li#learning_item_completion_162.learning_item_completion, jquery: "1.9.1", constructor: function, init: function, selector: "", size: function…]
    0: li#learning_item_completion_162.learning_item_completion
    accessKey: ""
    attributes: NamedNodeMap
    0: class
    1: data-completion-id
      ...
      nodeValue: "162"
      value: "162"
      ...
  </code></pre>
  
  <p>What's the right way to access completion-id?</p>