使用jsonata进行将字符串转换为十进制数。

huangapple go评论85阅读模式
英文:

I need a conversion of string to decimal using jsonata

问题

{
"Amt": 99.00
}

英文:

Json:
{
"Amt":"99.00"
}

Need output like

{
"Amt":99.00
}

答案1

得分: 1

你可以使用$number函数,在playground上查看示例:https://stedi.link/ZYFdShe

{
  "Amt": $number(Amt)
}
英文:

You can use the $number function, see it live on the playground: https://stedi.link/ZYFdShe

{
  "Amt": $number(Amt)
}

huangapple
  • 本文由 发表于 2023年7月18日 15:11:15
  • 转载请务必保留本文链接:https://go.coder-hub.com/76710289.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定