I'm trying to get first element from the array of values using exporterFieldCallback and export it to CSV file.
exporterFieldCallback: function ( grid, row, col, value ) {
if ( col.name == 'dates' ) {
return moment(value[0]).format("YYYY-MM-DD HH:mm");
}
else {
return value;
}
}
but I got TypeError: Cannot read property '0' of undefined
error.