怎么用表达式引用词典数据快速生成多级json数据?

动作需求 · 543 次浏览
H-D-G 创建于 2023-02-26 20:19

从:

{
  "到手单价_1": 188.0,
  "实付总价_1": 188.0,
  "可省金额_1": 188.0,
  "到手单价_2": 188.0,
  "实付总价_2": 188.0,
  "可省金额_2": 188.0,
  "到手单价_3": 188.0,
  "实付总价_3": 188.0,
  "可省金额_3": 188.0,
  "最优项": 188.0,
  "最优均价": 188.0
}

到:

{
"数据":[
{"name":"第1件","到手单价":"188.0","实付总价":"188.0","可省金额":"188.0"},
{"name":"第2件","到手单价":"188.0","实付总价":"188.0","可省金额":"188.0"},
{"name":"第3件","到手单价":"188.0","实付总价":"188.0","可省金额":"188.0"}],
"最优":[
"最优项":"188.0","最优均价":"188.0","最优惠金额":"188.0"}]
}

H-D-G 最后更新于 2023/2/28

回复内容
CL 2023-02-26 22:00
#1

先取出每一项数据,然后再参考这个:

https://getquicker.net/KC/Kb/Article/909 

回复主贴