I have a service called UserService that returns the roles of the logged in user.
It returns either
[{"authority":"ROLE_APEX_SUPPORT"},{"authority":"ROLE_APEX_READONLY"}] or [{"authority":"ROLE_APEX_READONLY"}].
I want to do something when I see that the response returned has ROLE_APEX_SUPPORT authority in it.
How do I parse the response to identify that?
let listOfAuthorities = this.userServices.getAuthorities();
listOfAuthorities is an array of JSON of above mentioned response.
How do I parse and see if it has Support role in response?