Existing Json data
{'list': {'KEY1': 'One'}}
Need to add
{'KEY2': 'Two'}
Result :
{'list': {'KEY1': 'One', 'KEY2': 'Two'}}
Any idea how to do it in python?
I'm tried append but it creates array in json object like this
{'list': [{'KEY1': 'One'}, {'KEY2': 'Two'}]}
{'list': {'KEY1': 'One'}, {'KEY2': 'Two'}}is invalid syntax.{'list': [{'KEY1': 'One'}, {'KEY2': 'Two'}]}is probably the closest to what you are looking for.{'list': {'KEY1': 'One', 'KEY2': 'Two'}}?{'list': {'KEY1': 'One', 'KEY2': 'Two'}}is valid