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

使用Jolt v0.1.1无法将嵌套JSON转换为扁平化JSON求助

Jolt转换解决方案

使用shift类型的Jolt规范即可完成所需的嵌套结构扁平化转换,具体配置如下:

[
  {
    "operation": "shift",
    "spec": {
      "accountNo": "accountNo",
      "type": "type",
      "Plans": {
        "*": "&"
      },
      "Address": {
        "Primary": {
          "*": "&"
        }
      }
    }
  }
]

规则逻辑

  • 直接保留输入根层级的accountNo、type字段到输出
  • Plans对象下的所有子字段直接提升至输出的根层级
  • Address.Primary下的所有地址子字段直接提升至输出的根层级

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.10.20 15:54:02