I have list of fields as a string:
[
"Container.Description",
"Container.Groups.12.Users.11.Name",
"Container.Groups.12.Users.12.Name",
"Container.Groups.13.Users.21.Name",
"Container.Groups.13.Users.22.Name"
]
Is there a way to convert this array of fields to json object like:
{
"Container": {
"Description": "",
"Groups": [
{
"12": {
"Users": [
{ "11": { "Name": "" }},
{ "12": { "Name": "" }}
]
}
},
{
"13": {
"Users": [
{ "21": { "Name": "" }},
{ "22": { "Name": "" }}
]
}
}
]
}
}
I need this code into typescript or c#. Thanks in advance.