I have a single object with an array of roles inside, and I need to transform the roles into an array of objects. See example below:
Current Object:
displayConfiguration: {
widgetList: {
widgetName: 'widget title',
entityType: 'Asset',
roles: [202]
},
addIcon: {
fileName: '',
fileDownloadUri: ''
},
displayInfoIcon: {
visible: true,
summaryText: 'info icon text'
},
useFilter: true
}
Expected Object:
displayConfiguration: {
widgetList: {
widgetName: 'widget title',
entityType: 'Asset',
roles: [
{
id: 202
}
]
},
addIcon: {
fileName: '',
fileDownloadUri: ''
},
displayInfoIcon: {
visible: true,
summaryText: 'info icon text'
},
useFilter: true
}