JSFiddle - React, Tailwind, and code Playground

by Adrian Smith

HTML

<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<script src="//cdn.datatables.net/1.10.4/js/jquery.dataTables.min.js"></script>
<table id="example" class="display" cellspacing="0" width="100%">
    <thead>
        <tr>
            <th>Name</th>
            <th>Position</th>
            <th>Office</th>
            <th>Extn.</th>
            <th>Start date</th>
            <th>Salary</th>
        </tr>
    </thead>
    <tfoot>
        <tr>
            <th>Name</th>
            <th>Position</th>
            <th>Office</th>
            <th>Extn.</th>
            <th>Start date</th>
            <th>Salary</th>
        </tr>
    </tfoot>
</table>

JavaScript

$(document).ready(function () {
                
                            var dataSet = [
                    {
                        "name": "&#60;span style=&#34;color: #069;&#34;&#62; Tiger Nixon &#60;/span&#62;",
                        "position": "System Architect",
                        "salary": "$320,800",
                        "start_date": "2011/04/25",
                        "office": "Edinburgh",
                        "extn": "5421"
                    },
                    {
                        "name": "Garrett Winters",
                        "position": "Accountant",
                        "salary": "$170,750",
                        "start_date": "2011/07/25",
                        "office": "Tokyo",
                        "extn": "8422"
                    }
                ];
                
                $('#example').dataTable({
                    "data": dataSet,
                    "columns": [
                        {"data": "name", "type" : "html"},
                        {"data": "position"},
                        {"data": "office"},
                        {"data": "extn"},
                        {"data": "start_date"},
                        {"data": "salary"}
                    ]
                });
            });