Can anyone help me with how I get the specific object's All Recordtype Names in Lwc.
I'm using the wire "getObjectInfo" method to get all info for object but I'm not getting how I iterate over "recordtypeinfo"(getting it from getObjectInfo method).
"recordTypeInfos": {
"recordTypeId 1": {
"available": true,
"defaultRecordTypeMapping": false,
"master": true,
"name": "Master",
"recordTypeId": "recordTypeId 1"
},
"recordTypeId 2": {
"available": true,
"defaultRecordTypeMapping": true,
"master": false,
"name": "XYZ",
"recordTypeId": "recordTypeId 2"
}
}
I'm getting above object from "data.recordTypeInfos".
Can someone help me to push name and id to one array.
ex.
arr.push({ label : "RecordTypeName HERE" , value: "RecordTypeId Here" });