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

请求提供JOLT规格:将指定JSON数组转换为GetUserResp结构

JOLT转换规格解决方案

输入JSON:

[
  {
    "id": 5417,
    "customer": 2000444,
    "deleted": false,
    "deleted_date": null,
    "photo_url": null,
    "additional_data": {
      "employee_id": "318878",
      "employee_type": "FTE"
    }
  }
]

期望输出JSON:

{
  "GetUserResp": [
    {
      "id": 5417,
      "customer": 2000444,
      "deleted": false,
      "deleted_date": null,
      "photo_url": null,
      "additional_data": {
        "employee_id": "318878",
        "employee_type": "FTE"
      }
    }
  ]
}

对应的JOLT规格:

[
  {
    "operation": "shift",
    "spec": {
      "@": "GetUserResp"
    }
  }
]

说明:这个shift操作会将输入的整个根数组(用@表示)直接映射到新对象的GetUserResp键下,完成数组的包装转换。

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.07.10 17:16:06