我有以下对象列表:
"animals":[
{
"family":"cat",
"color":"grey"
},
{
"family":"dog",
"color":"white"
}
]
我想animal
访问dog family and white color
. 我试图通过这样做来实现它:
animals[family = "dog" and color = "white"][0]
但它显示警告如下:
FEEL WARN while evaluating literal expression 'animals[ family = .... [string clipped after 50 chars, total length is 82]': Index out of bound: list of 1 elements, index 0; will evaluate as FEEL null
这里到底有什么不正确的?我觉得我在语义上做错了什么。我还参考了 FEEL 的规范,但无法弄清楚出了什么问题。我还参考了Redhat的 DMN 决策建模文档,但我仍然一无所知。请帮忙。