How do i get the specific value from json after deserialize wait for form task activity output

HI Team,

I am getting data in immediate window after deserialize wait for form task output “formtaskoutput.Data.ToString” but don’t know how to get specific value. could anyone please help ?

i want to get batchid as per below screenshot…i used jsonoutput(“batchid”) but getting exception.

Thanks in Advance

Hi @deepakchawla

Try This

batchId = jsonOutput(“details”)(“batchid”).ToString

we can get JSON direct from TaskOutput, without the need of Deserialize it extra

myBatchID = YourTOVar.GetDataJsonObject()(“batchId”).Value(Of String)

Kindly note the UpperCase I from Id as you used id instead

@sanjay3 I am getting error…could you please tell me why did we use “details” as it does not exist in above screenshot



“details” It is object name of my example

If the batchid is nested within another object or an array, you’ll need to navigate through the JSON structure accordingly. For example, if batchid is inside an object named details , you would access it like this:

batchId = jsonOutput(“details”)(“batchid”).ToString

If it is not then

batchId = jsonOutput(“batchid”).ToString

@ppr Working fine, Thanks

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.