I'm using Python v3.10.4.
I have two lists of dictionaries that are the same length typically a few hundred lines long, I need to combine them. These lists they represent security indicators of compromise that need to be enriched and fed to a firewall:
uniq = [
{'uniq-name': '2022-06-26 14:21:25.298167'},
{'uniq-name': '2022-06-26 14:21:25.298204'}
]
iocvalue = [
{'value': '116.30.7.55'},
{'value': '31.215.70.187'}
]
I'd like to produce this arrangement:
summary = [{uniq-name:'2022-06-26 14:21:25.298167',
value:'116.30.7.55'}]
I've tried:
[{[val for val in uniq] + [ val for val in iocvalue]}]
as well as several variations of **uniq, **iocvalue, but I couldn't get it working. What should I do?