Need help with splitting the string

Hello,
I am getting so confused in getting the value needed.
I have a very big string which I am saving in the variable output.
Eg.
{
“statusofapplication”: “G”,
“Noofcomponents”: 2,

I want to just extract G or sometimes the value there comes as R or whatever comes under statusofapplication in another variable “status”.

Can you please help me apply the string functions to get this value?

Hi @mb29 ,

Could you provide us with the Sample data that you receive as Input for Extraction ? It looks like Json Data, so we also ask if possible to provide as a Text file.

Hi @mb29

Please Use the below syntax :

System.text.regularexpressions.regex.match(input string,“(?<=statusofapplication).*”).value.trim

It helps!

Hi,

If you want to handle it by string manipulation, the following will work, for example.

 System.Text.RegularExpressions.Regex.Match(yourString,"(?<=statusofapplication""\s*:\s*"")\w+").Value

However, it might be better to use Json parse if it’s json as @supermanPunch mentioned.

Regards,

thanks for your message.
The data is huge…and its in the format as I showed like :
{
“statusofapplication”: “G”,
“Noofcomponents”: 2,
“actionRequiredDetails”: [
{
“name”: “TOTAL”,
“value”: 127
},
{
“name”: “New File”,
“value”: 25
},

From above input, I only need this the valur of statusofapplication, which in above example is G

All the above solutions work, but I fail to understand, when I run for the first time, it works. In the second and further runs, I dont get the output.
I think as suggested, I will have to go through saving the output as a text file.
Currently I am using “Use Browser” activity, and then using Get text and saving all the text received on the URL into the variable.
Not sure, I should now use the output and save it in a file?

I think I am not using the proper way to extract the data from browser itself. So, its a healthcheck URL, which when I open, it gives the output in JSON format.

Can you please advise how to parse JSON data?