I am mapping one array to another using a function called filter_json
as such:
filtered_json = map(filter_json, data_json)
def filter_json(data_json):
"""Filter data_json to data that is needed"""
...
# return mapped dictionary
Now I want to the filter_json
function to accept another parameter. Something like this (but this obviously doesn't work):
filtered_json = map(filter_json, data_json, var)
def filter_json(data_json, var):
"""Filter data_json to data that is needed"""
... # do something with var
# return mapped dictionary
How do I pass in more variables into filter_json
?