Skip to content

Commit

Permalink
#1742 allowing Choropleth key_on to traverse through array
Browse files Browse the repository at this point in the history
  • Loading branch information
amrutharajashekar committed Jun 21, 2023
1 parent 14c9d26 commit 158125b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion folium/features.py
Original file line number Diff line number Diff line change
Expand Up @@ -1554,7 +1554,7 @@ def __init__(

def get_by_key(obj, key):
return (
obj.get(key, None)
(obj[int(key)] if key.isdigit() else obj.get(key, None))
if len(key.split(".")) <= 1
else get_by_key(
obj.get(key.split(".")[0], None), ".".join(key.split(".")[1:])
Expand Down

0 comments on commit 158125b

Please sign in to comment.