How do I loop through this array and how do I display this roleName value want to loop through it with map
{
"userMenuDTO": {
"menuId": "13",
"menuName":"PruebaMenu900-13",
"menuRoute":"/path/ruta900-13",
"menuParentId":null,
"menuDinamico": true,
"menuEnabled": false,
"menuPosition": 900,
"menuIcono":"pruebaIcono",
"roles": [
{
"roleId": 1,
"roleName": "CO-MOCA-ADMIN",
"roleType": 1
},
{
"roleId": 2
}
]
}
}
x.userMenuDTO.roles- wherexis the name of the variable that object is in ... by the way, there is only a single array, there's no array inside another array in the data you posted