字段有时包含一个地图(带有结构
parameters
),有时它包含一个我需要转换为JSON的字符串。当"M": {}
字段存储在DynamoDB中时,我会收到以下错误:
parameters
我正在寻找的解决方案:我想确保: 如果字段已经是映射(
The function 'States.StringToJson($.Item.parameters.S)' had the following error: The JsonPath argument for the field '$.Item.parameters.S' could not be found in the input.
),则无需将其转换为JSON,并且可以按原样使用。
如果是字符串,我想应用parameters
"M": {}
字段将作为dynamoDB中的字符串存储,因此我需要一种适用于两种情况的解决方案。
我不是Jsonpath的专家,我不确定如何使用JSONPATH中的评估表达来实现这一目标。您在这里的帮助非常感谢...
工作流程SATE来解决此问题,以检查参数类型之前:
parameters