Skip to content

Instantly share code, notes, and snippets.

View yashmahendra13's full-sized avatar
🤺
Carpe Diem :)

Yash Mahendra yashmahendra13

🤺
Carpe Diem :)
View GitHub Profile
"""Extract nested values from a JSON tree."""
def json_extract(obj, key):
"""Recursively fetch values from nested JSON."""
arr = []
def extract(obj, arr, key):
"""Recursively search for values of key in JSON tree."""
if isinstance(obj, dict):