Using two tables divided data value

Using two tables divided data value

eri545eri545 Posts: 1Questions: 1Answers: 0
edited October 27 in Free community support

Link to test case:
Debugger code (
Error messages shown:
Description of problem:

Hello. I'm using two tables with same settings using ajax to get same data source. I'm trying to divide tables depending by json value. I.E
if ( value = "iOS") show this row in the first table
if ( value = "Android") show this row in the second table

here my example json data



Table script

var tables = $('table.display').DataTable( {
        "lengthMenu": [ [15, 25, 50, 75, -1],[15, 25, 50, 75, "All"] ],
        "order": [[ 1, "desc" ]],
        "ajax": {
            "url": "dataurl.php",
            "type": "GET",
            "data": {
                "url": window.location.href
        "rowId": function(a){return 'rowid_';},
        "columns": [
                "className":      'dt-control',
                "orderable":      false,
                "data":           null,
                "defaultContent": ''
            { "data": "time" },
            { "data": "type" },
            { "data": "status" },
            { "data": "amount" },
            { "data": "os" } ],

Is there a method to filter the data that i receive from json ajax and to send them to the wanted table?

Edited by Colin - Syntax highlighting. Details on how to highlight code using markdown can be found in this guide.


  • colincolin Posts: 12,881Questions: 0Answers: 2,198

    You could use ajax.dataSrc - see the last example on that page, it's manipulating the data returned by the server,


Sign In or Register to comment.