我的postgres中有2个表
[
{
"fN": "AB1",
"fd": {
"fC": {
"AT": 120,
"BF": 1500
}
},
"id": 1,
"pt": "A"
},
{
"id": 2,
"fN": "AB2",
"fd": {
"fC": {
"AT": 130,
"BF": 1300
}
},
"pt": "A"
}
]
[
{
"id": 1,
"fN": "AB1"
},
{
"id": 2,
"fN": "AB2"
}
]
现在,我想更新表B的列paxInfo并为表A的passenegers下具有相同ID的每个元素插入fd->'fC'->'BF'。例如,最后表B应该看起来像这样
[
{
"id": 1,
"fN": "AB1",
"cp" :1500
},
{
"id": 2,
"fN": "AB2",
"cp" :1300
}
]