I have an Apex Method named "ShowOutput" which is returning either true or false.
How can I evaluate the response is true or not in Aura controller.
I tried below code
var action = component.get('c.showOutput');
action.setCallback(this, function(response) {
var state = response.getState();
if(state === 'SUCCESS') {
component.set('v.searchHub', 'health-source');
} else {
component.set('v.source', 'health-source1');
}