get_occurrences_and_values throws when same value in multiple dicts
Created by: paultop6
l = [
{
"item1": 1234,
"item2": 5678,
"item4": [1234, 9012]
},
{
"item1": "abcd",
"item2": "efgh",
"item4": [1234, "adcf"]
}
]
get_occurrences_and_values(l, value=1234)
The code above will throw TypeError: 'NoneType' object is not iterable. I beieve the recursive action is matching 1234 within the list of item4 of the second dict, where it should be matching the entire value, or perhaps some kinda of different behaviour.