Dynamic aoColumns

Dynamic aoColumns

davehardyukdavehardyuk Posts: 1Questions: 0Answers: 0
edited May 2013 in General
Hi Guys,

I have a scenario where I need to dynamically create the values for the aoColumns variable.

I have a string (comma delimited) such as "null,null,date" - of which I need to somehow convert to:

[code]
"aoColumns": [
null,
null,
{ "sType": "date" }
]
[/code]

But if the comma delimited string is empty, I just need:

[code]"aoColumns": null[/code]

Any ideas how I can get this to work?

Thanks,

Dave
This discussion has been closed.