Question
CGI
DE
Last activity: 18 Mar 2022 10:58 EDT
How to get value from complex Json file ?
My Json contains multi layer arrays and I am struggling to deserialize json file.
Methods I have tried : 1. GetValueFromJson : I was only able to get value of Tasks which is the whole file
2. Tried to use lookup Table : Giving me some exception ( I tried to follow exact steps which were mentioned in some other thread but giving me exceptions)
What I want :
1. All the TaskID's as a List or
2. Datatable with three Major Columns TaskID, TaskInfo and TaskData (it is fine if my row contains ful xml as well) or
3. To be able to querry the Json object for values or
4. Ways that I can implement this using C# script
Any suggestions to achieve one of the above method is well appreciated or please feel free to suggest if there any other alternative ways.
Thank you in Advance,
Rahul
My Json contains multi layer arrays and I am struggling to deserialize json file.
Methods I have tried : 1. GetValueFromJson : I was only able to get value of Tasks which is the whole file
2. Tried to use lookup Table : Giving me some exception ( I tried to follow exact steps which were mentioned in some other thread but giving me exceptions)
What I want :
1. All the TaskID's as a List or
2. Datatable with three Major Columns TaskID, TaskInfo and TaskData (it is fine if my row contains ful xml as well) or
3. To be able to querry the Json object for values or
4. Ways that I can implement this using C# script
Any suggestions to achieve one of the above method is well appreciated or please feel free to suggest if there any other alternative ways.
Thank you in Advance,
Rahul
{
"Tasks": [
{
"TaskID": "11111",
"TaskInfo": {
"name": "111",
"description": "11111111111",
"createdDate": "xxx xxx 01 01:01:01 xxxx 1111",
"lastModifiedDate": "xxx xxx 01 01:01:01 xxx 1111",
"taskID": "11111",
"customTaskID": "xxx xxxxx",
"createdBy": "xxxxxx",
"lastModifiedBy": "xxxxx01",
"lastAcceptedBy": null,
"lastAcceptedDate": null,
"status": "active",
"priority": "none",
"acceptedByList": [],
"assignedToList": [
"XXX_Xxxxx XX"
],
"errorCode": null,
"errorMessage": null,
"taskUrl": "/xx111x11-111x-1x11-1x11-xxx1x11xx11.xxxx.xxx.xxxxxx.xxx?xxx1111.xxxxx=1.111111&xxx1111.xxxx=11111",
"taskTypeID": "xx111x11-111x-1x11-1x11-xxx1x11xx11",
"taskVersionNumber": 11,
"processInstanceID": "xx111x11-111x-1x11-1x11-xxx1x11xx11",
"rootProcessInstanceID": null,
"processModelID": "xxxxxx/xxxxxxxx",
"processModelVersion": "1",
"stepID": "x11",
"processIteration": "1",
"stepIteration": "1",
"delegatedToList": [],
"delegatedFromList": [],
"isMandatory": 1,
"taskScheduleDate": null
},
"TaskData": {
"MailboxData": {
"TISDetails": {
"tisTechnicalID": ""
},
"DocumentDetails": {
"firstName": "xxxxxxx",
"province": "111111",
"sender": "",
"product": "",
"subject": "1111",
"recipient": "",
"customerNumber": "111111",
"hospitalProvince": "",
"blz": "",
"lincenceNumber": "",
"recoNumber": "",
"documentType": "111",
"coInsurance": {},
"mandatory": "XXX",
"dateOfBirth": "11.11.1111",
"administratedBy": "111111",
"fil": "",
"policynumber": "",
"claimnumber": "",
"recommendedAgent": "XXX Xxxxx",
"received": "xxx xxx 11 11:11:11 xxxx 1111",
"name": "xxxx"
},
"DMSDocument": {
"dmsContentID": "xxxxxxxxxxxxxx111111111111xxxxxx"
},
"AssignementHistory": [
{
"assignerName": "XXX Xxxxx",
"date": "xxx xxx 11 11:11:11 XXX 1111",
"recommendedAgent": "",
"note": "XXXXXXXX\r\nXXXXXXXXX : 11.11.1111\r\nXxxxxxxxxx : 11.11.1111\r\nXxxxxxxxxx : XXXXXXX\r\nXxxxxxxxxx : Xxxxxxxx\r\nxxxxx xxxx. xxxx.xxxx : 11.11\r\nxxxxxxxxx : 1111111\r\nXxxxxx : \r\nXxxx : XX\r\nXXXXX : Xxx\r\nXxxxxx. Xxxxxxx : 1111111\r\nxxxxxxx. xxxxxxx : 11111\r\nXxxxx : 111\r\n\r\nXxxxxx\r\nXxxx : Xxx.Xx\r\nXxxx : xxxxx\r\nXxxxx : Xxxxxx\r\nXxxxxx : Xxx\r\nXxxxx : xxxxx\r\nxxx. : 11\r\nxxx : 1111\r\nxxx : xxxx\r\nxxxxxxx : 11.11.1111\r\nxxxx : [email protected]\r\nxxxxxx : 11111111\r\n\r\nxxxxx\r\nxxxxx : xx1111111\r\nxxx : xxxxxx\r\n\r\nxxxxx xxxxx\r\nXX xxxxx xxxx xxxxxx xxxxx\r\n\r\nxxxxxxx\r\nXxx : Xxxxxx\r\nxxxxx xxxxxx : 1\r\nxxxxxx : 11.11.1111\r\nxxxxxx xxxxxxx : Xxxxx\r\nXxxxx : 11111.1\r\nxxxxxxx : Xx\r\nXxxxxxx : \r\n",
"targetMailbox": "XX_XX XX",
"currentMailbox": "XX_XX XX",
"action": "XXXX"
}
],
"ProcessDetails": {},
"MailboxDetails": {
"priority": "",
"note": "XXXXXXXX\r\nXXXXXXXXX : 11.11.1111\r\nXxxxxxxxxx : 11.11.1111\r\nXxxxxxxxxx : XXXXXXX\r\nXxxxxxxxxx : Xxxxxxxx\r\nxxxxx xxxx. xxxx.xxxx : 11.11\r\nxxxxxxxxx : 1111111\r\nXxxxxx : \r\nXxxx : XX\r\nxxxxxx : Xx\r\nXxxxx. Xxxxxxx : 1111111\r\nxxxxxxx. xxxxxx : 111111\r\nxxxxxx : 111\r\n\r\nXxxx\r\nXxxx : Xxx.XX\r\nXxxxx : xxxxxx\r\nXxxxxx : Xxxxxx\r\nXxxxx : XXX\r\nXXX : xxxx\r\nxxx. : 11\r\nxxx : 1111\r\nxxx : xxxx\r\nxxxxx : 11.11.1111\r\nxxxx : [email protected]\r\nxxxxx : 111111\r\n\r\nxxxxx\r\nxxxxx : xx11111111111\r\nxxxx : xxxxxx\r\n\r\nxxxxx xxxxx\r\nXX xxxxx xxxx xxxxxx xxxxx\r\n\r\nxxxxxxx\r\nXxx : Xxxxxx\r\nxxxxx xxxxxx : 1\r\nxxxxxx : 11.11.1111\r\nxxxxxx xxxxxxx : Xxxxxxx\r\nxxxxxxx : 11111.1\r\nxxxxxxx : Xx\r\nXxxxxxx : \r\n",
"agent": "XXX Xxxxx",
"mailboxAssignmentDate": "xxx xxx 11 11:11:11 XXX 1111",
"category": "",
"mailbox": "xxx_xxxxx xx",
"agentUserID": "xxxxxxx1"
},
"LNDetails": {
"userEMail": "",
"taskComment": "",
"autoForward": "",
"userId": "",
"targetMailbox": "",
"lnDBLink": ""
},
"ScanDetails": {
"scanID": "11111111111111111111",
"scanTimestamp": "xxx xxx 11 11:11:11 XXX 1111",
"scanProvider": "Xxxxxxxxxx",
"scanLocation": "Xxxx"
}
}
}
},
{
"TaskID": "22222",
"TaskInfo": {
"name": "111",
"description": "11111111111",
"createdDate": "xxx xxx 01 01:01:01 xxxx 1111",
"lastModifiedDate": "xxx xxx 01 01:01:01 xxx 1111",
"taskID": "11111",
"customTaskID": "xxx xxxxx",
"createdBy": "xxxxxx",
"lastModifiedBy": "xxxxx01",
"lastAcceptedBy": null,
"lastAcceptedDate": null,
"status": "active",
"priority": "none",
"acceptedByList": [],
"assignedToList": [
"XX_XXX XX"
],
"errorCode": null,
"errorMessage": null,
"taskUrl": "/xx111x11-111x-1x11-1x11-xxx1x11xx11.xxxx.xxx.xxxxxx.xxx?xxx1111.xxxxx=1.111111&xxx1111.xxxx=11111",
"taskTypeID": "xx111x11-111x-1x11-1x11-xxx1x11xx11",
"taskVersionNumber": 11,
"processInstanceID": "xx111x11-111x-1x11-1x11-xxx1x11xx11",
"rootProcessInstanceID": null,
"processModelID": "xxxxxx/xxxxxxxx",
"processModelVersion": "1",
"stepID": "x11",
"processIteration": "1",
"stepIteration": "1",
"delegatedToList": [],
"delegatedFromList": [],
"isMandatory": 1,
"taskScheduleDate": null
},
"TaskData": {
"MailboxData": {
"TISDetails": {
"tisTechnicalID": ""
},
"DocumentDetails": {
"firstName": "xxxxxxx",
"province": "111111",
"sender": "",
"product": "",
"subject": "1111",
"recipient": "",
"customerNumber": "111111",
"hospitalProvince": "",
"blz": "",
"lincenceNumber": "",
"recoNumber": "",
"documentType": "111",
"coInsurance": {},
"mandatory": "XXX",
"dateOfBirth": "11.01.1111",
"administratedBy": "111111",
"fil": "",
"policynumber": "",
"claimnumber": "",
"recommendedAgent": "XXX Xxxxx",
"received": "xxx xxx 11 11:11:11 xxxx 1111",
"name": "xxxx"
},
"DMSDocument": {
"dmsContentID": "xxxxxxxxxxxxxx111111111111xxxxxx"
},
"AssignementHistory": [
{
"assignerName": "XXX Xxxxx",
"date": "xxx xxx 11 11:11:11 XXX 1111",
"recommendedAgent": "",
"note": "XXXXXXXX\r\nXXXXXXXXX : 11.11.1111\r\nXxxxxxxxxx : 11.11.1111\r\nXxxxxxxxxx : XXXXXXX\r\nXxxxxxxxxx : Xxxxxxxx\r\nxxxxx xxxx. xxxx.xxxx : 11.11\r\nxxxxxxxxx : 1111111\r\nXxxxxx : \r\nXxxx : XX\r\nXXXXX : Xxx\r\nXxxxxx. Xxxxxxx : 1111111\r\nxxxxxxx. xxxxxxx : 11111\r\nXxxxx : 111\r\n\r\nXxxxxx\r\nXxxx : Xxx.Xx\r\nXxxx : xxxxx\r\nXxxxx : Xxxxxx\r\nXxxxxx : Xxx\r\nXxxxx : xxxxx\r\nxxx. : 11\r\nxxx : 1111\r\nxxx : xxxx\r\nxxxxxxx : 11.11.1111\r\nxxxx : [email protected]\r\nxxxxxx : 11111111\r\n\r\nxxxxx\r\nxxxxx : xx1111111\r\nxxx : xxxxxx\r\n\r\nxxxxx xxxxx\r\nXX xxxxx xxxx xxxxxx xxxxx\r\n\r\nxxxxxxx\r\nXxx : Xxxxxx\r\nxxxxx xxxxxx : 1\r\nxxxxxx : 11.11.1111\r\nxxxxxx xxxxxxx : Xxxxx\r\nXxxxx : 11111.1\r\nxxxxxxx : Xx\r\nXxxxxxx : \r\n",
"targetMailbox": "XX_XXX XXX",
"currentMailbox": "XX_XXX XXX",
"action": "XXXXXXXX"
}
],
"ProcessDetails": {},
"MailboxDetails": {
"priority": "",
"note": "XXXXXXXX\r\nXXXXXXXXX : 11.11.1111\r\nXxxxxxxxxx : 11.11.1111\r\nXxxxxxxxxx : XXXXXXX\r\nXxxxxxxxxx : Xxxxxxxx\r\nxxxxx xxxx. xxxx.xxxx : 11.11\r\nxxxxxxxxx : 1111111\r\nXxxxxx : \r\nXxxx : XX\r\nxxxxxx : Xx\r\nXxxxx. Xxxxxxx : 1111111\r\nxxxxxxx. xxxxxx : 111111\r\nxxxxxx : 111\r\n\r\nXxxx\r\nXxxx : Xxx.XX\r\nXxxxx : xxxxxx\r\nXxxxxx : Xxxxxx\r\nXxxxx : XXX\r\nXXX : xxxx\r\nxxx. : 11\r\nxxx : 1111\r\nxxx : xxxx\r\nxxxxx : 11.11.1111\r\nxxxx : [email protected]\r\nxxxxx : 111111\r\n\r\nxxxxx\r\nxxxxx : xx11111111111\r\nxxxx : xxxxxx\r\n\r\nxxxxx xxxxx\r\nXX xxxxx xxxx xxxxxx xxxxx\r\n\r\nxxxxxxx\r\nXxx : Xxxxxx\r\nxxxxx xxxxxx : 1\r\nxxxxxx : 11.11.1111\r\nxxxxxx xxxxxxx : Xxxxxxx\r\nxxxxxxx : 11111.1\r\nxxxxxxx : Xx\r\nXxxxxxx : \r\n",
"agent": "XXX Xxxxx",
"mailboxAssignmentDate": "xxx xxx 11 11:11:11 XXX 1111",
"category": "",
"mailbox": "xxx_xxxxx xx",
"agentUserID": "xxxxxxx1"
},
"LNDetails": {
"userEMail": "",
"taskComment": "",
"autoForward": "",
"userId": "",
"targetMailbox": "",
"lnDBLink": ""
},
"ScanDetails": {
"scanID": "11111111111111111111",
"scanTimestamp": "xxx xxx 11 11:11:11 XXX 1111",
"scanProvider": "Xxxxxxxxxx",
"scanLocation": "Xxxx"
}
}
}
}
]
}
***Edited by Moderator Marije to add Capability tags***