Parse JSON in Mule 3.2 Flow

你离开我真会死。 提交于 2019-12-07 09:49:25

The way to do that with MEL is to deserialize the JSON payload and use an MVEL filtered projection:

<json:json-to-object-transformer returnClass="java.util.List" />
<expression-transformer 
    expression="#[($.price in message.payload if $.title == 'Moby Dick')[0]]" />

This expression doesn't take into account cases when Moby Dick isn't present. You didn't mention what to do in that case: I can beef up the expression if you specify the desired behavior when the book's not found.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!