'Iterate Json Extractor

I need to Extract multiple key value from json response based on condition. Below is json response I get in HTTP Request. I need to extract value of ID based on value of Document_ID value.

I am using $..result[?(@.Document_ID==${documentID})].ID to extract value. But I need to use this multiple times. As there is list of DocumentIDs for which I need to Get respective List of IDs from the same response.

 "result": [
            {
                "Owner": "PaperSave System",
                "Company": "RENXT Support Test Environment 1",
                "Document_ID": 46136,
                "Type of Gift": "Donation",
                "ContentType": "TIFF",
                "Acknowledgement Date": null,
                "IsRunning": true,
                "FileName": "test.tif",
                "Gift Amount": 10.0,
                "DepositCheck": null,
                "HasEventRaiseRights": true,
                "Step": "Deposit_Issues",
                "PaperSaveWorkflow_ID": 30,
                "Submit for Deposit": "Yes",
                "Created": "2022-02-09T14:11:24.6",
                "CurrentUserName": "PaperSave System",
                "Deposit Date": "2021-10-14T00:00:00",
                "Bank Account Number": "0063130611",
                "Number": null,
                "Batch": "",
                "Check Date": "2021-10-12T00:00:00",
                "Lookup": null,
                "ID": 25370,
                "Check Number": 1220.0,
                "Payment Method": "Direct Debit",
                "RDSCanBeVoided": null,
                "Constituent": "AAA Concretee",
                "Status": "",
                "Post Status": "Posted",
                "Successful Deposit Submission": "Yes",
                "Acknowledgement Status": null,
                "Receipt Date": "2021-11-05T00:00:00",
                "Receipt Status": "Receipted",
                "Receipt Amount": 10.0,
                "Gift Splits": "131043",
                "Post Date": "2021-10-12T00:00:00",
                "Has been associated field": "ps_database_ps",
                "Gift Processor": "PaperSave System",
                "Is Anonymous": "Yes",
                "Routing Number": "122000496",
                "Soft Credit": null,
                "Gift Date": "2021-10-12T00:00:00",
                "ContentId": 11474,
                "Deposit Status": null,
                "IsTerminated": null,
                "FileSize": 8,
                "Location": null
            },
            {
                "Owner": "PaperSave System",
                "Company": "RENXT Support Test Environment 1",
                "Document_ID": 46137,
                "Type of Gift": "Donation",
                "ContentType": "TIFF",
                "Acknowledgement Date": null,
                "IsRunning": true,
                "FileName": "test.tif",
                "Gift Amount": 10.0,
                "DepositCheck": null,
                "HasEventRaiseRights": true,
                "Step": "Deposit_Issues",
                "PaperSaveWorkflow_ID": 30,
                "Submit for Deposit": "Yes",
                "Created": "2022-02-09T14:11:47.43",
                "CurrentUserName": "PaperSave System",
                "Deposit Date": "2021-10-14T00:00:00",
                "Bank Account Number": "0063130611",
                "Number": null,
                "Batch": "",
                "Check Date": "2021-10-12T00:00:00",
                "Lookup": null,
                "ID": 25371,
                "Check Number": 1220.0,
                "Payment Method": "Direct Debit",
                "RDSCanBeVoided": null,
                "Constituent": "AAA Concretee",
                "Status": "",
                "Post Status": "Posted",
                "Successful Deposit Submission": "Yes",
                "Acknowledgement Status": null,
                "Receipt Date": "2021-11-05T00:00:00",
                "Receipt Status": "Receipted",
                "Receipt Amount": 10.0,
                "Gift Splits": "131065",
                "Post Date": "2021-10-12T00:00:00",
                "Has been associated field": "ps_database_ps",
                "Gift Processor": "PaperSave System",
                "Is Anonymous": "Yes",
                "Routing Number": "122000496",
                "Soft Credit": null,
                "Gift Date": "2021-10-12T00:00:00",
                "ContentId": 11475,
                "Deposit Status": null,
                "IsTerminated": null,
                "FileSize": 8,
                "Location": null
            }

Is there any way I can achieve this?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source