Get the specific tag value from deserialized Json output

Hi Friends, I am to get the specific tag value from the json output.
Please find my json response from deserialized json.
{
“ListViewingSettingResponse”: {
@ServiceVersionNumber”: “2.0”,
“TransactionDetail”: {
“ApplicationTransactionID”: “Param_SMS”,
“ServiceTransactionID”: “ParamService_ListViewingSetting_2019-05-24T14:33:02.775”,
“TransactionTimestamp”: “2019-05-24T14:33:02.775”,
“SubmittingOfficeID”: “50”
},
“TransactionResult”: {
“SeverityText”: “Information”,
“ResultID”: “CM000”,
“ResultDescription”: “Success”,
“ResultMessage”: [
{
“ResultMessageText”: “Success”
}
]
},
“ListViewingSettingResponseDetail”: {
“UserDetail”: {
“UserID”: “MIKEATOSN”,
“CustomerID”: 107878787878780044199
},
“UserMatchedQuantity”: 40,
“UserReturnedQuantity”: 40,
“SettingDetail”: [
{
“TagDetail”: {
“TagID”: “100526”
},
“ViewingProfileID”: 263658,
“SettingSubjectDetail”: [
{
“BusinessNumber”: “436325369”,
“CountryISOAlpha2Code”: “IT”,
“SettingStartDate”: {
“$”: “2019-05-10 14:15:08.543462”
},
“SettingEndDate”: {
“$”: “2020-05-13 02:45:05.331”
},
“SettingStatusText”: “Active”,
“AutoRenewalIndicator”: false
},
{
“BusinessNumber”: “222773868”,
“CountryISOAlpha2Code”: “GB”,
“SettingStartDate”: {
“$”: “2019-05-10 14:15:08.543462”
},
“SettingEndDate”: {
“$”: “2020-05-13 02:45:05.331”
},
“SettingStatusText”: “Active”,
“AutoRenewalIndicator”: false
},
{
“BusinessNumber”: “267658816”,
“CountryISOAlpha2Code”: “FR”,
“SettingStartDate”: {
“$”: “2019-05-10 14:15:08.543462”
},
“SettingEndDate”: {
“$”: “2020-05-13 02:45:05.331”
},
“SettingStatusText”: “Active”,
“AutoRenewalIndicator”: false
},
{
“BusinessNumber”: “412452240”,
“CountryISOAlpha2Code”: “NL”,
“SettingStartDate”: {
“$”: “2019-05-10 14:15:08.543462”
},
“SettingEndDate”: {
“$”: “2020-05-13 02:45:05.331”
},
“SettingStatusText”: “Active”,
“AutoRenewalIndicator”: false
},
{
“BusinessNumber”: “460035000”,
“CountryISOAlpha2Code”: “ES”,
“SettingStartDate”: {
“$”: “2019-05-10 14:15:08.543462”
},
“SettingEndDate”: {
“$”: “2020-05-13 02:45:05.331”
},
“SettingStatusText”: “Active”,
“AutoRenewalIndicator”: false
},
{
“BusinessNumber”: “694860991”,
“CountryISOAlpha2Code”: “KR”,
“SettingStartDate”: {
“$”: “2019-05-10 14:15:08.543462”
},
“SettingEndDate”: {
“$”: “2020-05-13 02:45:05.331”
},
“SettingStatusText”: “Active”,
“AutoRenewalIndicator”: false
},
{
“BusinessNumber”: “433807970”,
“CountryISOAlpha2Code”: “IT”,
“SettingStartDate”: {
“$”: “2019-05-10 14:15:08.543462”
},
“SettingEndDate”: {
“$”: “2020-05-13 02:45:05.331”
},
“SettingStatusText”: “Active”,
“AutoRenewalIndicator”: false
},
{
“BusinessNumber”: “267373112”,
“CountryISOAlpha2Code”: “FR”,
“SettingStartDate”: {
“$”: “2019-05-10 14:15:08.543462”
},
“SettingEndDate”: {
“$”: “2020-05-13 02:45:05.331”
},
“SettingStatusText”: “Active”,
“AutoRenewalIndicator”: false
},
{
“BusinessNumber”: “432486429”,
“CountryISOAlpha2Code”: “IT”,
“SettingStartDate”: {
“$”: “2019-05-10 14:15:08.543462”
},
“SettingEndDate”: {
“$”: “2020-05-13 02:45:05.331”
},
“SettingStatusText”: “Active”,
“AutoRenewalIndicator”: false
},
{
“BusinessNumber”: “221225650”,
“CountryISOAlpha2Code”: “GB”,
“SettingStartDate”: {
“$”: “2019-05-10 14:15:08.543462”
},
“SettingEndDate”: {
“$”: “2020-05-13 02:45:05.331”
},
“SettingStatusText”: “Active”,
“AutoRenewalIndicator”: false
},
{
“BusinessNumber”: “321771644”,
“CountryISOAlpha2Code”: “DE”,
“SettingReasonCode”: 6333,
“SettingStartDate”: {
“$”: “2019-05-10 14:15:08.543462”
},
“SettingEndDate”: {
“$”: “2020-05-13 02:45:05.331”
},
“SettingStatusText”: “Active”,
“AutoRenewalIndicator”: false
},
{
“BusinessNumber”: “491038193”,
“CountryISOAlpha2Code”: “NL”,
“SettingStartDate”: {
“$”: “2019-05-10 14:15:08.543462”
},
“SettingEndDate”: {
“$”: “2020-05-13 02:45:05.331”
},
“SettingStatusText”: “Active”,
“AutoRenewalIndicator”: false
},
{
“BusinessNumber”: “329026624”,
“CountryISOAlpha2Code”: “DE”,
“SettingReasonCode”: 6333,
“SettingStartDate”: {
“$”: “2019-05-10 14:15:08.543462”
},
“SettingEndDate”: {
“$”: “2020-05-13 02:45:05.331”
},
“SettingStatusText”: “Active”,
“AutoRenewalIndicator”: false
},
{
“BusinessNumber”: “427480006”,
“CountryISOAlpha2Code”: “PL”,
“SettingStartDate”: {
“$”: “2019-05-10 14:15:08.543462”
},
“SettingEndDate”: {
“$”: “2020-05-13 02:45:05.331”
},
“SettingStatusText”: “Active”,
“AutoRenewalIndicator”: false
},
{
“BusinessNumber”: “310016758”,
“CountryISOAlpha2Code”: “FO”,
“SettingStartDate”: {
“$”: “2019-05-10 14:15:08.543462”
},
“SettingEndDate”: {
“$”: “2020-05-13 02:45:05.331”
},
“SettingStatusText”: “Active”,
“AutoRenewalIndicator”: false
},
{
“BusinessNumber”: “511599966”,
“CountryISOAlpha2Code”: “CZ”,
“SettingStartDate”: {
“$”: “2019-05-10 14:15:08.543462”
},
“SettingEndDate”: {
“$”: “2020-05-13 02:45:05.331”
},
“SettingStatusText”: “Active”,
“AutoRenewalIndicator”: false
},
{
“BusinessNumber”: “341132198”,
“CountryISOAlpha2Code”: “DE”,
“SettingReasonCode”: 6333,
“SettingStartDate”: {
“$”: “2019-05-10 14:15:08.543462”
},
“SettingEndDate”: {
“$”: “2020-05-13 02:45:05.331”
},
“SettingStatusText”: “Active”,
“AutoRenewalIndicator”: false
},
{
“BusinessNumber”: “887609936”,
“CountryISOAlpha2Code”: “SK”,
“SettingStartDate”: {
“$”: “2019-05-10 14:15:08.543462”
},
“SettingEndDate”: {
“$”: “2020-05-13 02:45:05.331”
},
“SettingStatusText”: “Active”,
“AutoRenewalIndicator”: false
},
{
“BusinessNumber”: “350035793”,
“CountryISOAlpha2Code”: “SE”,
“SettingStartDate”: {
“$”: “2019-05-10 14:15:08.543462”
},
“SettingEndDate”: {
“$”: “2020-05-13 02:45:05.331”
},
“SettingStatusText”: “Active”,
“AutoRenewalIndicator”: false
},
{
“BusinessNumber”: “262398257”,
“CountryISOAlpha2Code”: “FR”,
“SettingStartDate”: {
“$”: “2019-05-10 14:15:08.543462”
},
“SettingEndDate”: {
“$”: “2020-05-13 02:45:05.331”
},
“SettingStatusText”: “Active”,
“AutoRenewalIndicator”: false
},
{
“BusinessNumber”: “314114966”,
“CountryISOAlpha2Code”: “DE”,
“SettingReasonCode”: 6333,
“SettingStartDate”: {
“$”: “2019-05-10 14:15:08.543462”
},
“SettingEndDate”: {
“$”: “2020-05-13 02:45:05.331”
},
“SettingStatusText”: “Active”,
“AutoRenewalIndicator”: false
},
{
“BusinessNumber”: “537299240”,
“CountryISOAlpha2Code”: “DE”,
“SettingReasonCode”: 6333,
“SettingStartDate”: {
“$”: “2019-05-10 14:15:08.543462”
},
“SettingEndDate”: {
“$”: “2020-05-13 02:45:05.331”
},
“SettingStatusText”: “Active”,
“AutoRenewalIndicator”: false
},
{
“BusinessNumber”: “970980181”,
“CountryISOAlpha2Code”: “AR”,
“SettingStartDate”: {
“$”: “2019-05-10 14:15:08.543462”
},
“SettingEndDate”: {
“$”: “2020-05-13 02:45:05.331”
},
“SettingStatusText”: “Active”,
“AutoRenewalIndicator”: false
},
{
“BusinessNumber”: “490845800”,
“CountryISOAlpha2Code”: “NL”,
“SettingStartDate”: {
“$”: “2019-05-10 14:15:08.543462”
},
“SettingEndDate”: {
“$”: “2020-05-13 02:45:05.331”
},
“SettingStatusText”: “Active”,
“AutoRenewalIndicator”: false
},
{
“BusinessNumber”: “401469622”,
“CountryISOAlpha2Code”: “HU”,
“SettingStartDate”: {
“$”: “2019-05-10 14:15:08.543462”
},
“SettingEndDate”: {
“$”: “2020-05-13 02:45:05.331”
},
“SettingStatusText”: “Active”,
“AutoRenewalIndicator”: false
},
{
“BusinessNumber”: “750088556”,
“CountryISOAlpha2Code”: “AU”,
“SettingStartDate”: {
“$”: “2019-05-10 14:15:08.543462”
},
“SettingEndDate”: {
“$”: “2020-05-13 02:45:05.331”
},
“SettingStatusText”: “Active”,
“AutoRenewalIndicator”: false
},
{
“BusinessNumber”: “714092983”,
“CountryISOAlpha2Code”: “JP”,
“SettingStartDate”: {
“$”: “2019-05-10 14:15:08.543462”
},
“SettingEndDate”: {
“$”: “2020-05-13 02:45:05.331”
},
“SettingStatusText”: “Active”,
“AutoRenewalIndicator”: false
},
{
“BusinessNumber”: “657082186”,
“CountryISOAlpha2Code”: “TW”,
“SettingStartDate”: {
“$”: “2019-05-10 14:15:08.543462”
},
“SettingEndDate”: {
“$”: “2020-05-13 02:45:05.331”
},
“SettingStatusText”: “Active”,
“AutoRenewalIndicator”: false
},
{
“BusinessNumber”: “305000296”,
“CountryISOAlpha2Code”: “DK”,
“SettingStartDate”: {
“$”: “2019-05-10 14:15:08.543462”
},
“SettingEndDate”: {
“$”: “2020-05-13 02:45:05.331”
},
“SettingStatusText”: “Active”,
“AutoRenewalIndicator”: false
},
{
“BusinessNumber”: “529177609”,
“CountryISOAlpha2Code”: “CN”,
“SettingStartDate”: {
“$”: “2019-05-10 14:15:08.543462”
},
“SettingEndDate”: {
“$”: “2020-05-13 02:45:05.331”
},
“SettingStatusText”: “Active”,
“AutoRenewalIndicator”: false
},
{
“BusinessNumber”: “401881206”,
“CountryISOAlpha2Code”: “FI”,
“SettingStartDate”: {
“$”: “2019-05-10 14:15:08.543462”
},
“SettingEndDate”: {
“$”: “2020-05-13 02:45:05.331”
},
“SettingStatusText”: “Active”,
“AutoRenewalIndicator”: false
},
{
“BusinessNumber”: “461035687”,
“CountryISOAlpha2Code”: “ES”,
“SettingStartDate”: {
“$”: “2019-05-10 14:15:08.543462”
},
“SettingEndDate”: {
“$”: “2020-05-13 02:45:05.331”
},
“SettingStatusText”: “Active”,
“AutoRenewalIndicator”: false
},
{
“BusinessNumber”: “461070000”,
“CountryISOAlpha2Code”: “ES”,
“SettingStartDate”: {
“$”: “2019-05-10 14:15:08.543462”
},
“SettingEndDate”: {
“$”: “2020-05-13 02:45:05.331”
},
“SettingStatusText”: “Active”,
“AutoRenewalIndicator”: false
},
{
“BusinessNumber”: “222764245”,
“CountryISOAlpha2Code”: “GB”,
“SettingStartDate”: {
“$”: “2019-05-10 14:15:08.543462”
},
“SettingEndDate”: {
“$”: “2020-05-13 02:45:05.331”
},
“SettingStatusText”: “Active”,
“AutoRenewalIndicator”: false
},
{
“BusinessNumber”: “345180477”,
“CountryISOAlpha2Code”: “NO”,
“SettingStartDate”: {
“$”: “2019-05-10 14:15:08.543462”
},
“SettingEndDate”: {
“$”: “2020-05-13 02:45:05.331”
},
“SettingStatusText”: “Active”,
“AutoRenewalIndicator”: false
},
{
“BusinessNumber”: “901382929”,
“CountryISOAlpha2Code”: “BR”,
“SettingStartDate”: {
“$”: “2019-05-10 14:15:08.543462”
},
“SettingEndDate”: {
“$”: “2020-05-13 02:45:05.331”
},
“SettingStatusText”: “Active”,
“AutoRenewalIndicator”: false
},
{
“BusinessNumber”: “340305718”,
“CountryISOAlpha2Code”: “DE”,
“SettingReasonCode”: 6333,
“SettingStartDate”: {
“$”: “2019-05-10 14:15:08.543462”
},
“SettingEndDate”: {
“$”: “2020-05-13 02:45:05.331”
},
“SettingStatusText”: “Active”,
“AutoRenewalIndicator”: false
},
{
“BusinessNumber”: “378787469”,
“CountryISOAlpha2Code”: “FR”,
“SettingStartDate”: {
“$”: “2019-05-10 14:15:08.543462”
},
“SettingEndDate”: {
“$”: “2020-05-13 02:45:05.331”
},
“SettingStatusText”: “Active”,
“AutoRenewalIndicator”: false
},
{
“BusinessNumber”: “221594032”,
“CountryISOAlpha2Code”: “GB”,
“SettingStartDate”: {
“$”: “2019-05-10 14:15:08.543462”
},
“SettingEndDate”: {
“$”: “2020-05-13 02:45:05.331”
},
“SettingStatusText”: “Active”,
“AutoRenewalIndicator”: false
},
{
“BusinessNumber”: “460054444”,
“CountryISOAlpha2Code”: “ES”,
“SettingStartDate”: {
“$”: “2019-05-10 14:15:08.543462”
},
“SettingEndDate”: {
“$”: “2020-05-13 02:45:05.331”
},
“SettingStatusText”: “Active”,
“AutoRenewalIndicator”: false
}
]
}
]
}
}
}

In this I want to get the “ViewingProfileID”
and same way I want to print out all the “BusinessNumber”. Kindly help me out.

Hi there…

Welcome to UiPath community…!

About your question - you could have pasted a text file instead of putting the whole JSON response in the question.

By the way this can be taken care of by JSON parsing, but I feel like your requirement of extracting the Number and Profile ID is quite straightforward so I have used crude, inefficient string operation to achieve the objective. please find the attached project folder, JsonProcess.zip (24.8 KB)

Reply if you have any more questions. BTW you can see all the extraction in output panel as I have given writeline command.

Regards :slight_smile:

1 Like

Hi Raghav,
Many Thanks for the solution provided. Much Appreciated :partying_face:.
I have another query over this. How can I capture all the business number in to a DataTable, So that I can manipulate to save as a CSV or XLS file.

I tried some activities , but all in vain:thinking:.

Regards,
Me.

Hi Mohan,

You can capture it in the same way that I have demonstrated for the other strings using text manipulation (vb.net)