Get the specific data from a queue item retrieved from api in a loop (JSON object)

Hello again.

I am looping from a JObject that I deserialized previously:

This are the way how the for each is working an setup.

It works fine for getting EndProcessing data:

image

But I am also trying to get some info, and I cant find the way to reach it:

image

The info is there, but I dont know how for example call the ID info, something like:

qitem(“SpecificData”).NotAnIntuitiveMethod(“ID”).tostring

I tried with select token, .item, etc and couldnt find a process to work with specific content retrieved from a queue item through orchestrator api.

Also, there is no my first question here about json objects and Linq, I’d appreciate some documentations or tutorials to improve me productivity while coding. And not being hit by the same rock over and over.

Thanks for your time :slight_smile:

would it be possible that you can share a sample JSON as txt / txt file. For Sure mask your sensivtive data.

quitem(“SpecificData”)(“DynamicProperties”)(“ID”).toString was tested?

Hello again Peter!

I had tried:
image

qitem(“SpecificData”).tostring:

“{"DynamicProperties":{"ItemKey":"49477","ID":"49477","EntryType":"SecretThings"}}”

qitem.ToString
@“{
““Reference””: ““49477"”,
““StartProcessing””: ““2021-07-26T12:51:56.517Z””,
““EndProcessing””: ““2021-07-26T12:51:59.89Z””,
““SpecificData””: “”{"“DynamicProperties"”:{"“ItemKey"”:"“49477"”,"“ID"”:"“49477"”,"“EntryType"”:"“SecretThings"”}}””
}"

PS: If you ever go to Granada, Spain, I owe you some drinks.

first round:
given json was not accepted / parsed. I did edited and removed some " check yellow marks
then it was working
grafik

it looks that a serialized string is within Specific Content. In a second round we should over come.

Please check if the yellow marks are part of json or not. For this please write out json string to a text file (Write file activity) and share it with us. Thanks

given string was failing as it was reported as invalid JSON
removed " (see yellow marks) was accepted
SpecificContent expects simple dataypes, otherwise we can store serialized objects

Driven how a valid JSOn would look like, a serialized string with the \" was created
JSON was parseable

Log Output / Panels contents can sometimes confuse and displaying different the values
this JSON
grafik

produced:
grafik
close to
image

So the idea was about:
Parse the serialized object back to a JObject
grafik

And we got:
grafik

1 Like

Also have a look here:

Yeah It works, when I have time I will read and practice with all your guides in the forum, and other tutorials for Linq and Json Objects.

Thank you Peter, as always, you really are an MVP.

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