How to merge two json string in Python?

Assuming a and b are the dictionaries you want to merge: c = {key: value for (key, value) in (a.items() + b.items())} To convert your string to python dictionary you use the following: import json my_dict = json.loads(json_str) Update: full code using strings: # test cases for jsonStringA and jsonStringB according to your data input … Read more