gpt4 book ai didi

amazon-web-services - 带有数组列表的 AWS EventBridge 输入转换规则

转载 作者:行者123 更新时间:2023-12-05 08:04:20 33 4
gpt4 key购买 nike

我有一个 Arraylist 事件:

I have an Arraylist :

"TelephoneDetails": {
"Telephone": [
{
"Number": "<Number>",
"Type": "<Type>",
"Primary": "<Primary>",
"TextEnabled": "<TextEnabled>"
},{
"Number": "<Number>",
"Type": "<Type>",
"Primary": "<Primary>",
"TextEnabled": "<TextEnabled>"
}
]
}
如何为此 InputPath 编写 InputTransformer? ,

我可以用这个得到电话[0]

{

"Type": "$.detail.payload.TelephoneDetails.Telephone[0].Type",
"Number": "$.detail.payload.TelephoneDetails.Telephone[0].Number",
"Primary": "$.detail.payload.TelephoneDetails.Telephone[0].Primary",
"TextEnabled": "$.detail.payload.TelephoneDetails.Telephone[0].TextEnabled"

}

不知道怎么写,如果我有N个ArrayList?

最佳答案

就这么简单:

"TextEnabled": "$.detail.payload.TelephoneDetails.Telephone[*].TextEnabled"

请注意 [*] 而不是 [0] 让模板引擎迭代 Telephones

关于amazon-web-services - 带有数组列表的 AWS EventBridge 输入转换规则,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69351526/

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com