How to get specific value from variable

Hello everyone,

I can’t find the solution to solve the following problem:

I have the following output in my variable “ResultTD”:

  • "{"id":"4ab9f0dc-e9c7-4f08-9277-47368ac48836","number":"CH2209-0351","templateId":"a5f756c1-5372-4a50-a61f-0021a0e36114","requester":{"id":"0691191f-56b4-43b8-b757-bf59eee8429b" … -

How can I get the first id before the value “CH2209-0351”, so my next variable will look like this:


Thank you very much in advance and have a nice weekend,
Dennis :slight_smile:

Hi @bibalesecret,

Can you try this regex pattern : (?<="id":).*(?=,"number")

When i try this, i can get the specified id.

Kind Regards

1 Like

it is about JSON Data Processing

Use Desrialize JSON Activity (UiPath.WebApi.Activities Package) - myJObject

then use an assign Activity:
strID = myJObject("id").Value(Of String)

1 Like

That worked brilliant, thank you!!!

But can you explain how it gets the exact id when there are multiple id’s in the variable myJObject, with only “myJObject(“id”).Value(Of String)” :smiley: ?

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