My objective is to create a JSON file like this
{
"empList": {
"1234": {
"fullName": "Joe Tester",
"city": "Austin",
"state": "TX"
},
"2344": {
"fullName": "Tim Developer",
"city": "Dallas",
"state": "TX"
}
}
}
I have a list of employees as a flat structure in a employee string array (id, fullname, city, state). How can I write the JavaScript code to create json structure above?