Deserialize the json file

Hello All, I am working to deserialize the json file . Getting error in the first step itself.

[
{
“identifier”: “b6b6e741-ff46-42ec-9c8c-2339ddebaad6”,
“sourceName”: “PERSEUS”,
“startDate”: “2023-07-28”,
“status”: {
“statusName”: “FOUND”,
“userId”: 7333,
“toolName”: “PERSEUS”,
“note”: “advancing for LDs, recon please investigate”,
“dateTime”: “2023-08-15T05:02:55.9433333”,
“metaData”: “{"modifiedByPerseusJob":-91575099262}”
},
“typeName”: “COUPON_MISSING_PREDICTION_ERROR”,
“createdDateTime”: “2023-07-29T01:33:52.3833333”,
“metaData”: “{"accountId":241180,"metaData":{"49":{"securityId":280263},"50":"COUPON_ERROR","35":47.09,"4":"57643LEV4","7":"2022-10-25","25":280263,"9":"2022-10-25","28":963006045},"resolved":false,"type":132,"level":1,"userId":7333,"note":"advancing for LDs, recon please investigate","active":true,"issueId":"b6b6e741-ff46-42ec-9c8c-2339ddebaad6","firstReconDate":"2023-07-28"}”,
“attributes”: {
“externalDataSourceTypes”: [
“CUSTODY”
]

@suresh_kumar9

Welcome to the community

Please use deserialize activity and change the type argument to jarray or use as jobj only

And after deserialize use

Jobj(0)("identifier").ToString gives you the first identifier

Similarly change the number

Cheers

Hi @suresh_kumar9

Can you specify what is the error you are getting.
Make sure you have proper formatted version of your JSON. Below is proper formatted version of your JSON.

[
    {
        "identifier": "b6b6e741-ff46-42ec-9c8c-2339ddebaad6",
        "sourceName": "PERSEUS",
        "startDate": "2023-07-28",
        "status": {
            "statusName": "FOUND",
            "userId": 7333,
            "toolName": "PERSEUS",
            "note": "advancing for LDs, recon please investigate",
            "dateTime": "2023-08-15T05:02:55.9433333",
            "metaData": {
                "modifiedByPerseusJob": -91575099262
            }
        },
        "typeName": "COUPON_MISSING_PREDICTION_ERROR",
        "createdDateTime": "2023-07-29T01:33:52.3833333",
        "metaData": {
            "accountId": 241180,
            "metaData": {
                "49": {
                    "securityId": 280263
                },
                "50": "COUPON_ERROR",
                "35": 47.09,
                "4": "57643LEV4",
                "7": "2022-10-25",
                "25": 280263,
                "9": "2022-10-25",
                "28": 963006045
            },
            "resolved": false,
            "type": 132,
            "level": 1,
            "userId": 7333,
            "note": "advancing for LDs, recon please investigate",
            "active": true,
            "issueId": "b6b6e741-ff46-42ec-9c8c-2339ddebaad6",
            "firstReconDate": "2023-07-28"
        },
        "attributes": {
            "externalDataSourceTypes": [
                "CUSTODY"
            ]
        }
    }
]

Hope it helps!!

Thank you… I got the output

2 Likes

@suresh_kumar9

Hope the solution above helped you

Cheers

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.