this is a sample nested dictionary in JSON format.
{
"dict1": {
"key": "value",
},
"dict2": {
"dict_id": {
"key1": "value1",
"key2": "value2"
}
}
}
I would like to replace "dict_id" with a string derived from a variable which generates IDs in Numbers. example "1001", "1002", "1003" so it gives me following output.
{
"dict1": {
"key": "value",
},
"dict2": {
"1001": {
"key1": "value1",
"key2": "value2",
},
"1002": {
"key1": "value1",
"key2": "value2",
},
"1003": {
"key1": "value1",
"key2": "value2",
}
}
}
how can i get the above results?, any help will be appreciated. thanks...