There is any way to use a wildcard in order to skip a dictionary key.
I have the following nested dictionary:
{'1': {'date': '25-Jan-21 12:45:15:788 ', 'payload':' ****AAAA** **
****'},
'2': {'date': '25-Jan-21 12:45:15:881 ', 'payload': ****'BBB**
**'},
'3': {'date': '25-Jan-21 12:45:15:897 ', 'payload': ' ****CCC**
**'},
'4': {'date': '25-Jan-21 12:45:15:907 ', 'payload': ' ****DDD**
**'}}
And i want to ignore the first keys 1, 2 .... and extract only the value corresponding to payload key.
is possible to use some kind of wild card like i tried below?
for i in data['*']['payload']:
print(i)
question from:
https://stackoverflow.com/questions/65891364/search-for-a-dictionary-key-value-using-wildcard 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…