Skip to content

Instantly share code, notes, and snippets.

View nikhilc2710's full-sized avatar
🏠
Working from home

nikhil nikhilc2710

🏠
Working from home
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):