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
Anil_G
(Anil Gorthi)
February 2, 2024, 6:55am
2
@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
Parvathy
(PS Parvathy)
February 2, 2024, 6:57am
3
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
Regards
1 Like
lrtetala
(Lakshman Reddy)
February 2, 2024, 6:57am
4
Hi @shruthi_arali
How about the following?
Json("status").ToString
Json("data")("dealId").ToString
Json("data")("quoteId").ToString
Cheers!!
1 Like
mkankatala
(Mahesh Kankatala)
February 2, 2024, 6:59am
5
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
Parvathy
(PS Parvathy)
February 2, 2024, 8:08am
6
@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!!