madhu
madhu

Reputation: 87

to fetch a specific value from resultset in Mule

I have a flow that calls a MS SQL stored procedure which returns a value. The output that i get from the DB is {resultset1=[{id=30}]} i would like to store the value of id to flow variable

couldn't find a successful way to do this, Could somebody please help me in this

I'am using mule server 3.4.0 EE

Thank you in Advance

Upvotes: 1

Views: 1145

Answers (1)

Anirban Sen Chowdhary
Anirban Sen Chowdhary

Reputation: 8311

First place a json-to-object-transformer and then try the following :-

<json:json-to-object-transformer returnClass="java.util.HashMap" />
<set-variable variableName="id" value="#[payload.resultset1[0].id]" doc:name="Variable"/>

Upvotes: 2

Related Questions