❔ How can I query a JSON doc for only objects with a specific property value?

I have a JSON object that looks like this:
{
    "pagedata": [
        {
            "id": "settings_tab_1",
            "data": {
                "oneSetting": {
                    "id": "InitialExperience",
                    "value": "1505209",
                    "options": [
                        {
                            "value": "option1"
                        }
                    ]
                },
                ...
        },
        {
            "id": "settings_tab_5",
            "data": {
                "someOtherSetting": {
                    "id": "ResultSortOrder",
                    "value": "1064235",
                    "options" [
                        {
                            "value": "option1"
                        }
                    ]                
                },
                ...
            }
        }
    ],
    "selectedTabId": "settings_tab_5",
    "statuscode": "OK",
    "props": {
        "type": "settings",
        "baseurl": "/settings"
    }
}

The pagedata array here has two items, with
id
values of settings_tab_1 and settings_tab_5. How could I extract a version of this JSON with only one pagedata item, the one with an
id
value of settings_tab_5?
Was this page helpful?