@Chris:
I'm dealing with product information. I have 4 db tables: Division, Department, Class, Items. DivisionID is the key for Department, DepartmentID is the key for Class and Division, Department and class keys for items.
I need to dynamically produce a similar format as below from these SQL tables. It would be great if I could simply "ConverTo" Json a SQL query to produce this output.
{
"name": "MEN'S SPORTSWEAR",
"category_id": "1",
"subcategories": [
{
"name": "MENS OUTERWEAR",
"category_id": "100",
"subcategories": [
{
"name": "LW JACKET",
"category_id": "1001",
"children": [
{
"id": "3626553",
"name": "GOLF SOLID JACKET"
},
{
"id": "3470879",
"name": "FINE BEDFORD CORD BLAZER"
},
{
"id": "3470903",
"name": "FINE BEDFORD CORD BLAZER"
},
{
"id": "3439403",
"name": "DBL CHEST STRIPE"
},
{
"id": "3439312",
"name": "DBL CHEST STRIPE"
},
{
"id": "3531068",
"name": "DBL CHEST STRIPE"
},
{
"id": "3531076",
"name": "DBL CHEST STRIPE"
},
{
"id": "3581295",
"name": "CHEST PIECED CROSS BOMBER"
},
{
"id": "3586963",
"name": "HOODED PARKA"
},
{
"id": "3628286",
"name": "INTERNATIONAL NEWPORT VST"
}
]
},