Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 83167

How to put multiple data in a datatable column?

$
0
0
My JSON is as follows:
[{"name": "John Doe", "email": "john@gmail.com", "address" : "blah"}] 

In Datatables I can easily show these 3 pieces of info in 3 diff columns using the following:
columnDefs = [ 
                { "mData": "name", "aTargets":[0] },
                { "mData": "email", "aTargets":[1] },
                { "mData": "address", "aTargets":[2] }
             ]; 
But the problem is that I want to show "name" and "email" in 1st column and then "address" in the 2nd column. How can I do that? Please guide.

Viewing all articles
Browse latest Browse all 83167

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>