Extract data from Json format string

Hi below is the JSON string extracted from Deserialize JSON activity.

{
“messages”: ,
“status”: “SUCCESS”,
“data”: {
“quoteId”: 4744448627,
“dealId”: 70165774,
“userId”: “mariar”,
“testCaseName”: “test case name for UI path POC”,
“testCaseDesc”: “Test==”
},
“metaInfos”:
}

I need to extract Status, dealID, QuoteID separately.

Please let me know how to get it

@shruthi_arali

After deserialize say it is stored in jobj variable

Then jobj("status").ToString

Jobj("data")("quoteid").ToString
Jobj("data")("dealid").ToString

Will gice the required data

Cheers

Hi @shruthi_arali

Try the below syntaxes:
Use Deserialse JSON and store the output say JObject and after that use it in Assign activity:

status= (JObject("status")).ToString
dealId= (JObject("data")("dealId")).ToString
quoteId = (JObject("data")("quoteId")).ToString

image

Regards

1 Like

Hi @shruthi_arali

How about the following?

Json("status").ToString
Json("data")("dealId").ToString
Json("data")("quoteId").ToString

image

Cheers!!

1 Like

Hi @shruthi_arali

Deseralize the Json file by using the Deseralize Json activity. Output - JsonObject

- Assign -> Status = JsonObject("status")

- Assign -> dealId = JsonObject("data")("dealId")

- Assign -> QuoteId = JsobObject("data")("quoteId")

Hope it helps!!

1 Like

@shruthi_arali

If you find the solution for your query please mark my post as solution to close the loop or if you have any questions please let me know, I’m happy to help.

Happy Automation!!