我是mulesoft的新手。我想要获得一个特定值,或者从一组详细信息中获得一个值,而不使用数据库。
所以我使用file连接器和来post和获取我的值。
我使用mule requestor读取文件作为中间工作,将CSV文件转换为json。现在,它以JSON格式检索所有的值。我无法获得特定的id..
有谁能帮我解决这个问题吗?
发布于 2018-05-04 20:48:32
假设您正在以json格式获取以下数据
{
"entries": [{
"Profile Status": "3",
"Remedy Login ID": "jorge.hawkins",
"Person ID": "KKPPPLL123212457788"
}]
}然后,请尝试使用以下语法从您的json数据中获取特定ID
#[json:entries[0]/'Person ID']发布于 2018-05-08 15:03:00
您可以使用transform message processor将有效负载从json转换为java。这将帮助您遍历到对象中的任何节点。在java对象中的遍历比在任何其他对象类型中简单得多。
例如:json[{ "customer_name": "ABC", "customer_id": "1_ABC", "customer_detail": { "customer_age": 30, "customer_status": "Active" } }, { "customer_name": "DEF", "customer_id": "2_DEF", "customer_detail": { "customer_age": 31, "customer_status": "Inactive" } }, { "customer_name": "GHI", "customer_id": "3_GHI", "customer_detail": { "customer_age": 32, "customer_status": "Active" } }, ]
https://stackoverflow.com/questions/50174440
复制相似问题