Dynamic aoColumns
Dynamic aoColumns

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
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.