Bui Hai Duong
Bui Hai Duong

Reputation: 271

Access property json in variable (flowVars) Mulesoft

i have a problem like this: I saved my request Json to Variable and now i want to access property in Json throught Variable. How can i do this ? #[flowVars.x.id] or #[flowVars.x/id] not working. And i using open source so i can't use datawave too.

Upvotes: 0

Views: 109

Answers (1)

aled
aled

Reputation: 25699

Convert to a Java object before assigning to the flowVar:

<json:json-to-object-transformer doc:name="JSON to Object" returnClass="java.lang.Object"/>

Then you can access the attributes by name.

Upvotes: 1

Related Questions