2021年1月22日星期五

Python how to merge array json

How to merge array json in Python? I have 2 set of data,

a = [{'date':'1/1/2019'},{'date':'1/1/2020'},{'date':'1/1/2021'}] b = [{'value':'2'},{'value':'5'},{'value':'6'}]

how can I merge it to below result ?

[{'date':'1/1/2019','value':'2'},{'date':'1/1/2020','value':'5'}, {'date':'1/1/2021','value':'6'}]

https://stackoverflow.com/questions/65855601/python-how-to-merge-array-json January 23, 2021 at 12:00PM

没有评论:

发表评论