How to combine cells or use 2 data in one cell
How to combine cells or use 2 data in one cell
brabus
Posts: 3Questions: 1Answers: 0
Hi,
for instance i got the following data my application receive by an ajax request:
{
"name": "Tiger Nixon",
"link": "example1.com"
"address": "n.a.",
"age": "40",
},
{
"name": "J.D.",
"link": "example2.com"
"address": "n.a.",
"age": "20",
}
now I want the name to be a link in my table, but every name has another Link.
How can I get the value of link in the rendering of the name?
e.g.:
"columns": [
{"data": "name",
"render":function(data){
return '<a href="'+//**here should be the link**//+'">'+data+'</a>' ;
} },
output:
[name] [address] [age]
[Tiger Nixon](example1.com) n.a 40
[J.D.](example2.com) n.a 20
Thank You
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Is there realy no way of doing this?
if i read your field names right, try...
perfect, thank you very much!