Datatables display columns by Index rather than name
<p>The following code works fine for me:</p>

<pre><code>$(document).ready(function () {
            var t = $("#users").DataTable({
                columnDefs: [{
                    "searchable": false,
                    "orderable": false,
                    "targets": 0
                }],
                order: [[1, 'asc']],
                ajax: {
                    url: "/api/users",
                    dataSrc: ""
                },
                columns: [
                    {
                        data: "id"
                    },
                    {
                        data: "firstName"
                    },
                    {
                        data: "lastName"
                    },
                    {
                        data: "userName"
                    },
                    {
                        data: "id",
                        render: function (data) {
                            return "&lt;a href='#'&gt;&lt;i class='fa fa-eye js-view' data-id='" + data + "'&gt;&lt;/i&gt;&lt;/a&gt; | &lt;a href='#'&gt;&lt;i class='fa fa-pencil js-edit' data-id='" + data + "'&gt;&lt;/i&gt;&lt;/a&gt; | &lt;a href='#'&gt;&lt;i class='fa fa-trash js-delete' data-id='" + data + "'&gt;&lt;/i&gt;&lt;/a&gt;";
                        }
                    }
                ],
</code></pre>

<p>Is there a way to use column indexes instead of names like this?:</p>

<pre><code>$(document).ready(function () {
            var t = $("#users").DataTable({
                columnDefs: [{
                    "searchable": false,
                    "orderable": false,
                    "targets": 0
                }],
                order: [[1, 'asc']],
                ajax: {
                    url: "/api/users",
                    dataSrc: ""
                },
                columns: [
                    {
                        data: 0
                    },
                    {
                        data: 1
                    },
                    {
                        data: 2
                    },
                    {
                        data: 3
                    },
                    {
                        data: 0,
                        render: function (data) {
                            return "&lt;a href='#'&gt;&lt;i class='fa fa-eye js-view' data-id='" + data + "'&gt;&lt;/i&gt;&lt;/a&gt; | &lt;a href='#'&gt;&lt;i class='fa fa-pencil js-edit' data-id='" + data + "'&gt;&lt;/i&gt;&lt;/a&gt; | &lt;a href='#'&gt;&lt;i class='fa fa-trash js-delete' data-id='" + data + "'&gt;&lt;/i&gt;&lt;/a&gt;";
                        }
                    }
                ],
</code></pre>

<p>All I basically want to do is to be able to display the first 4 columns of a web API source or even choose which four columns to display by INDEX not by name.  Is this possible?</p>