Fetch the value inside a text file

I have below information in text file .There are multiple text file inside the folder

Input : {“WorkItem”:“51234557”,“ConversationID”:“10635790”}

Expected output : 10635790

I need to fetch the value for ConversationID and add into datatable .

Please guide me

Hi @tharaninatarajan1901 ,

Use Json file has Dictionary and Get value

for you reference pls check below link…

@tharaninatarajan1901 ,

  1. Use Read text file activity to Read the data from the Text file
    2.Use deserialize Json Activity to Convert the Output From String to “Jobject” and Provide the TextfileOutput as input for this activity.
  2. Set the Output of “Desrialize Json” activity as something like this .Lets say “JsonOutput”
    4.Now take an assign activity and give JsonOutput(“ConversationID”).ToString
    This will provide you with the required output for Conversation ID

Regards,

2 Likes

HI,
How about either of the following?

Regex

System.Text.RegularExpressions.Regex.Match(yourString,"(?<=ConversationID\W+)\d+").Value

DeserializeJson

jo("ConversationID").Value(Of String)

Sample20230613-7L.zip (4.5 KB)

Regards,

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