I am using angular 1.5 in my application, where I am using the JSON response from a rest service call to display data on the UI. I have a requirement now to change the text shown on UI based on particular 'statu's which comes from the rest service call. Can someone help me on how to use angular filters to achieve this?
JSON Response :
var response = {
"recordCnt": 1,
"details": [{
"type": "user",
"**status**": 0
}]
};
The **status** could be '1' as well as '2'. I need to show different verbages based on these values on the UI.
eg : If the status is '0', I will have to show 'inactive', 'active' if status is '1' and 'expired' in case of status '2'