if key exist json python code example
Example: python json check if key exists
import json
if 'id' not in dest:
dest['id'] = -1
targetId = dest['id']
import json
if 'id' not in dest:
dest['id'] = -1
targetId = dest['id']