Skip to content

Instantly share code, notes, and snippets.

View gigkokman's full-sized avatar

Songkran Nethan gigkokman

View GitHub Profile
@gigkokman
gigkokman / get_nested_value.py
Last active November 9, 2020 14:14
Python function get dictionary's value from nested with dot annotation key
from functools import reduce
def get_nested_value(nested_dict, str_key):
"""
Get value from nested-dict via dot-annotation key
Parameters:
nested_dict: dict
str_key: str
Example: