如何在Mulesoft 4中将变量设置为保留字

问题描述 投票:0回答:2

在我的有效载荷中,我有一个类型字段,我想设置一个具有其值的变量。我收到一个错误“无效的输入“类型”,预期的arrayValueSelector或valueSelector(第1行,第12列)”。

enter image description here

anypoint-studio mulesoft
2个回答
0
投票

您需要引用属性名称以避免该错误:

#[payload[0].'type']

0
投票

任何保留字(如果作为输入输入,都应使用引号引起来,例如] >>

[payload.'type']

enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.