Data Table only showing one single character

Data Table only showing one single character

smilesprowersmilesprower Posts: 6Questions: 4Answers: 0
edited July 2016 in Free community support

The data tables are only showing one single character and I don't understand ?
I have tried JSON.stringify and it produces the same results.
The returned data is also in the same format as data created if I do an alert.

Code I am using.

$(document).ready(function() {
    $('#example').DataTable( {
        data: dataSet,
        columns: [
            { title: "Name" },
        ]
    } );
} );

json.stringify data
[[Power], [Mark], [Jason]]
~~~~
data
Power,Mark,Jason

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

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 62,327Questions: 1Answers: 10,227 Site admin
    Answer ✓

    Seems to work okay for me: http://live.datatables.net/pukavafi/1/edit . We'd need a test case showing the issue, per the forum rules, to be able to offer any help.

    Allan

  • smilesprowersmilesprower Posts: 6Questions: 4Answers: 0

    I figured out what the problem was,

    The data was still in string format and needed to be JSON.parse(data);

This discussion has been closed.