if result:
    for k, v in list(result.items()):
        found[k] = v
elif type(haystack) == type([]):
    for node in haystack:
        result = deep_search(needles, node)
if result:
    for k, v in list(result.items()):
        found[k] = v
return found
deep_search(['P1', 'P3'], json.loads(json_string))
How can I use python finding particular json value by key?