Thank you for posting query in Microsoft Q&A Platform. JSON is dictionary in python.
Yes, we can do that easily in python. In your notebook consider writing python to accomplish your requirements.
In your case you need to remove item
"3":"NO"from main dictionary and also add item("3":"YES") to Sub dictionary of property"2".
Lets say your dictionary is myDic variable then,
- To remove items from dictionary we should consider using
myDic.pop("3")- To add items to dictionary we should consider using syntax as
(myDic["2"])["3"] = "YES"
- To add items to dictionary we should consider using syntax as
Please check below screenshot.

Code used in above screenshot:
myDic = {
"1":{
"a":"",
"b":""
},
"2":{
"c":"1",
"d":"1"
},
"3":"NO"
}
myDic.pop("3")
(myDic["2"])["3"] = "YES"
print(myDic)
Please note, position of property "3" inside property "2" does not have any impact as dictionaries in python don't work on index's and we can't have duplicate properties in it.
Please check below video for better understanding of python dictionaries.
Dictionaries in Python
Hope this helps.
Please consider hitting Accept Answer button. Accepted answers help community as well.
