I wanna call a function from an object in js
var elementId = event.target.id;
var controller = $('#' + elementId).data('controller') + 'Controller';
var action = $('#' + elementId).data('action');
this is my data
right call would look like this
FilterController.getCurrentFilter('hosts-button');
but how do i build it with my variables elementId / controller / action ?
my try
controller + '.' + action + '(' + elementId + ')';
don't work
thank you very much for help :)