如果我有以下 JSON
[
{ "category": "reference",
"author": "Nigel Rees",
"title": "Sayings of the Century",
"price": 8.95
},
{ "category": "fiction",
"author": "Evelyn Waugh",
"title": "Sword of Honour",
"price": 12.99
},
{ "category": "fiction",
"author": "Herman Melville",
"title": "Moby Dick",
"isbn": "0-553-21311-3",
"price": 8.99
},
{ "category": "fiction",
"author": "J. R. R. Tolkien",
"title": "The Lord of the Rings",
"isbn": "0-395-19395-8",
"price": 22.99
}
]
我可以使用以下 JSONPath 获得“Moby Dick”的价格:
$..[?(@.title=='Moby Dick')].price
结果:
'0' => "8.99"
但是我如何在 Mule 中做到这一点..... json 表达式在 mule 3.2 流程中获得相同结果会是什么样子?
我不介意您的答案是否显示了如何以另一种方式进行操作,只要我在 mule 中得到相同的结果。
谁能帮我解决这个问题??