如何使用聚合来实现这一点?
以下是我的数据:
{
"FirstName": null,
"LastName": "test1",
"Gender": null,
"IsActive": true,
},
{
"FirstName": "test2",
"LastName": "jagema",
"Gender": "Female",
"IsActive": true,
},
我希望最终的 OP 是:
{
"FullName": "abiy Jagema",
"Gender": "Female",
"IsActive": true,
},
{
"FullName": Natra,
"Gender": null,
"IsActive": true,
},
因此,如果名字和姓氏都存在 concat else 只需将姓氏设置为全名