append only if there is data
append only if there is data

Hi,
I have the following column:
"columns": [
{ "data": "ssName2",
fnCreatedCell: function (nTd, sData, oData, iRow, iCol) {
$(nTd).append(' ('+oData['ss1Name2']+')'); }}
]
How can I make it that only when ss1Name2 has data and not null or empty the data is appended?
Because now, when it's empty or null I get ().
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
And please do not point me to the api
I am not a programmer 
I now know I need to use: https://www.datatables.net/examples/advanced_init/column_render.html
But still, I do not know how to check if the data is empty so that I do not combine it.
I would expect something like this, but it does not work
Anybody?
I don't think
>= null
will do what you expect. Also you need to move the}, "targets": 0
outside the render function. Maybe something like this:Kevin
Yessssssssssss tnx!
I only changed this, because null didn't work in my case: if(row['ss1Name2'] <= "")
Thanks!