Answer the question
In order to leave comments, you need to log in
How to parse a python dictionary?
as possible from
{'uID': {0: 2809037216, 1: 2809037242}, 'Дата': {0: '2021-11-03 13:53:10', 1: '2021-10-31 22:37:14'}}
[{'uID':2809037216, 'Дата': "2021-11-03 13:53:10" },{'uID':2809037242, 'Дата': "'2021-10-31 22:37:14" }]
Answer the question
In order to leave comments, you need to log in
keys = list(data.keys())
result = [ { k: data[k][i] for k in keys } for i in range(len(data[keys[0]])) ]
Elementary. Iterate over the uid key-value pairs and query the date dictionary for the required dates using the corresponding keys, form new dictionaries and add them to a list. dump result to json.
If you don’t understand these words, then it’s too early for you to solve this problem on your own, you should learn python or go to freelancers.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question