You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何实现当DeleteUserName匹配v2_communities中元素时移除对应元素?

数组元素移除规则及示例

规则说明

  • 若DeleteUserName字段的值存在于v2_communities数组中,需从该数组中移除该值
  • 处理完成后删除DeleteUserName字段

输入示例

{ 
  "abc": "123",
  "v2_communities": [
    "community1",
    "community2"
  ],
  "DeleteUserName": "community1"
}

输出示例

{ 
  "abc": "123",
  "v2_communities": [
    "community2"
  ]
}

逻辑说明

输入中DeleteUserName的值为community1,该值存在于v2_communities数组内,因此将其从数组中移除,同时删除DeleteUserName字段。

内容的提问来源于stack exchange,提问作者sandilya ch

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.26 04:02:06