Orchestrator queueitem as JARRAY to string

Hello Teams, i need help in deserializing a jarray properly.
I get queue items from orchestrator which are jarray. Their structures on my queue is:
Specific Data: Object
Recipient: [“onemail@provider.com”]
CarbonCopy: [“hismail@provider.com,"hermail@provider.com"]
object: [“task 16300509”]
body: [“task 16300509”]
Documents: [“C:\Users\The User\Desktop\DummyFile.xlsx”]
Square brackets exist like i’m showing. These are all jarray generated with escape and uploaded to Orchestrator queue via api from another application.
I try the sequence out_TransactionItem.SpecificContent(“Recipient”).ToString → deserialize jarray → foreach entry linq in Recipient-> write entry(“Recipient”).Value(Of string) but i get errors like RemoteException wrapping System.InvalidOperationException: Cannot access child value on Newtonsoft.Json.Linq.JValue.
at Newtonsoft.Json.Linq.JToken.get_Item(Object key)
at lambda_method(Closure , ActivityContext )
at Microsoft.VisualBasic.Activities.VisualBasicValue`1.Execute(CodeActivityContext context)
and so on.
Could you please help me in managing properly these jarrays? I need to stringify them. Many many thanks for help.

Can you post the exact JSON you are getting from the queues @VALMAN

Exact Json i’m getting from a queue:

Specific Data: Object
Destinatari: [“mannino.valentina@legalmail.it”]
UtenzaCC: [“stefano.viola@cinquantaventi.com,"valentina.mannino@cinquantaventi.com"]
oggetto: [“pratica 16300509”]
corpo: [“pratica 16300509”]
Documenti: [“C:\Users\Valentina Mannino\Desktop\DummyFile.xlsx”]

This is not in the JSON format @VALMAN

If you want to get the value of receipient from this string you have, try getting it by splitting activities

EntireText.Substring(EntireText.IndexOf("Receipent: ")+"Receipent: ".Length).Split(Environment.NewLine.ToCharArray)(0)

this will give you the receipent with the braces and then try replacing them as

(textsplitted.replace(“[”,“”]).replace(“]”,“”)

I’ll try immediately!!! Many manyThanks! I’ll feedback asap!

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