The DataTable contains single column EFFDATE.
EFFDATE
2015-06-15
2014-10-21
2014-07-17
2014-07-16
2014-06-17
2014-03-13
I have the following code to convert DataTable dttbl to JSON.
JsonConvert.SerializeObject(dttbl, Formatting.Indented)
The output from conversion is
[
{
"EFFDATE": "2015-06-15"
},
{
"EFFDATE": "2014-10-21"
},
{
"EFFDATE": "2014-07-17"
},
{
"EFFDATE": "2014-07-16"
},
{
"EFFDATE": "2014-06-17"
},
{
"EFFDATE": "2014-03-13"
}
]
The output I want is
{
"EFFDATE": [
"2015-06-15",
"2014-10-21",
"2014-07-17",
"2014-07-16",
"2014-06-17",
"2014-03-13"
]
}
Please advice.