title: Get id value from Datatable button
body: <p>I have a <code>datatable</code> in my project which works perfectly, in the last column I'm adding a button for each row which also works fine.</p>
  
  <p>I'm assigning a specific value to the <code>id</code> attribute of this button and trying now to get that value when clicking on the button but I didn't manage to get that</p>
  
  <p>Any suggestions please?</p>
  
  <pre><code>var table = $("#example").DataTable();
          $('#example tbody').on('click', 'button', function () {
              var id = table.row($(this).attr('id'));
              console.log(id);
          });
  </code></pre>
  
  <p>but the above code returns:</p>
  
  <blockquote>
    <p>[0: Array[0], context: Array[1], selector: Object, ajax: Object]</p>
  </blockquote>