I have a SQL Server source table defined as:
CstCmpCode Main_Group Sub_Group ClosBal
AH01 Neck Wraps AFGHANI 7
I need the output to be:
{
"CstCmpCode": "AH01",
"Main_Group": "Neck Wraps",
"sub_group": [
{
"Sub_Group": "AFGHANI",
"ClosBal": 7
}
]
}
I have the source SQL Server table being imported to a DataSet, then was going to use JSON.NET to parse the results. I was thinking I should create some sort of Class structure with a main_group having a list of sub_group/closbal key/value pairs, but I'm not totally sure if that's the right track or not.
Thanks. Yogesh.Sharma