'Select the table rows on the basis of id from api not key

I'm new to antd and I'm stuck at one place in my project. I want to select the checkboxes of rows by based on the id from an api and the api has not the key how to solve it when i select one check box it is selectin all checkboxes in antd table.

 <Table
                        rowSelection={{
                            selectedRowKeys:list.map(item => item.key ),
                            type: selectionType,
                            ...rowSelection,
                            onSelect: (record) => {
                                slctdRws.push(record);
                                Setselectrow(slctdRws);




                            },
   this is one object of many from list  that I am getting from an API
 {
    "PatientName": "RONALDO Christiano",
    "NHI": "GHE9671",
    "DOB": "26-Jan-1992",
    "GenderCode": "M",
    "TxSite": "CMDHB",
    "TxLocation": "Ward-10C",
    "MedicationName": "foliNIc acid (15 mg/m<sup>2</sup>) 30 mg/m<sup>2 IV",
    "TreatmentDayMedicationID": "GcBYv2QSZ4T5/UdjgSXGqw==",
    "TxDay": "Day 4",
    "TreatmentDaysID": "VywrpIeblwxCR2zKASMLlQ==",
    "DoseDirection": null,
    "RequestStatusId": null,
    "Qty": "3",
    "RxStatus": "1",
    "ValidatedBy": "Naveed",
    "ClinicalDecision": false,
    "BookedDate": "2022-04-26T07:45:11.483",
    "DateRequired": "2022-04-26T07:45:11.483",
    "AccuracyCheck": false,
    "ReleasedAt": "2022-04-26T07:45:11.483",
    "IsOnStudy": false,
    "IsCTM": false,
    "IsCom": false,
    "LDO": true,
    "IsApproved": true,
    "IsQueried": false,
    "Dose": "30 mg/m<sup>2",
    "DoseUnit": "mg/m<sup>2</sup>",
    "Diluent": null,
    "Route": null,

}



Sources

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

Source: Stack Overflow

Solution Source