I was able to resolve this eventually steps below:
I integrated the data object in my anonymous object which i am are already returning:
return Json(new {data = data, f = "error"});
Then access the data object in my ajax call like this:
success: function (_data) {
var returnedData = _data.data;
}
Which means i have to adjust my map method call where i am preparing the data array for the table. Instead of:
var arr = $.map(JSON.parse(_data), function (el) { return el });
Then call it with the data object _data.data:
var arr = $.map(JSON.parse(_data.data), function (el) { return el });
This actually did the trick for me.