We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 04854ce commit 135100aCopy full SHA for 135100a
1 file changed
braspag_sdk/utils/object_json.py
@@ -24,14 +24,22 @@ def __getattribute__(self, attribute):
24
25
26
def process_name_key(dictionary):
27
+
28
+ # If it's a list, process each item.
29
+ if isinstance(dictionary, list):
30
+ new_list = []
31
+ for item in dictionary:
32
+ new_list.append(process_name_key(item))
33
+ return new_list
34
35
+ # If it's not a dictionary (and not list), just return it as is.
36
if not isinstance(dictionary, dict):
37
return dictionary
38
39
+ # If it's a dictionary, process each key/value.
40
new_dictionary = {}
-
41
for key in dictionary:
42
new_dictionary[capitalize_key(key)] = process_name_key(dictionary[key])
43
return new_dictionary
44
45
0 commit comments