From e44f591f710d85deb944e96ac08a029957617c55 Mon Sep 17 00:00:00 2001 From: Russell Ballestrini Date: Wed, 16 Oct 2019 12:17:07 -0700 Subject: [PATCH] Update lookup_api.py --- nested_lookup/lookup_api.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nested_lookup/lookup_api.py b/nested_lookup/lookup_api.py index 5d25dbf..a0af63a 100644 --- a/nested_lookup/lookup_api.py +++ b/nested_lookup/lookup_api.py @@ -72,8 +72,9 @@ def nested_update(document, key, value, in_place=False, treat_as_element=True): def _nested_update(document, key, value): """ - Method to update a key->value pair in a nested document. If values count less than - keys count, then uses last value as default. + Method to update a key->value pair in a nested document. + If the number of passed values is less than the number of key matches + when scanning for updates, use last value as default. Args: document: Might be List of Dicts (or) Dict of Lists (or) Dict of List of Dicts etc...