I would like to know if there is a possibility of using filter
with a lambda
function to select a conjunto de dados
of a array de J
SON
in Python
.
Example: I have the following JSON
already as dict
in Python
, follows the structure. And I would like% with% filtrar
which are of type dict's internos
.
{'events': [{'event':'a', ...},{'event':'b',...},{'event':'a'...}]}
I would like something like:
list_a = dict(filter(lambda x: [events][][x] == 'a', data_json.items()))
I can not see a way to 'event' == 'a'
the most internal dictionaries of this filtrar
.