Get all queue items in a assing

I need that in a string type log message, all the Json content that contains a queue element is sent

@alexis.mendoza.rpa

Can you elaborate a little on what you need

Cheers

Sure.
To access the specific content of a queue element we usually do it with .specificcontent, what I need is that in a log message it sends me everything that the queue element contains, all the parameters, this is because I have to send it to a cell in a database

@alexis.mendoza.rpa

Please try this

String.Join(",",queueitem.Specificcontent.Select(function(x) x.Key.ToStirng + ":" + x.Value.ToString).ToArray)

Cheers

ÂżWhat is fuction(x)?

@alexis.mendoza.rpa

It a lambda function…which get each item and we can manipulate them if we need

Cheers

Great.

Works

It will be possible to give it the following format?

{ “Key1” : “Valie1” , “Key2” : “Value2” …“KeyN” : “ValueN”}

@alexis.mendoza.rpa

Try this

"{" + String.Join(",",queueitem.Specificcontent.Select(function(x) """" + x.Key.ToStirng + """:""" + x.Value.ToString + """").ToArray) + "}"

cheers

1 Like

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