【发布时间】:2012-12-02 11:07:21
【问题描述】:
如果我有以下 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 中得到相同的结果,我不介意您的回答是否显示了如何以另一种方式做到这一点。
谁能帮我解决这个问题?
【问题讨论】:
-
这样的事情是否可行#[json-node://[title=='Moby Dick']/price]
标签: json expression esb mule jsonpath