getData = function(highlighted, processed, delimiter, asJson) {
    const obj = this;

    // Control vars
    const dataset = [];
    let px = 0;
    let py = 0;

    // Column and row length
    const x = Math.max(...obj.options.data.map(function(row) {
        return row.length;
    }));
    const y = obj.options.data.length

    // Go through the columns to get the data
    for (let j = 0; j < y; j++) {
        px = 0;
        for (let i = 0; i < x; i++) {
            // Cell selected or fullset
            if (! highlighted || obj.records[j][i].element.classList.contains('highlight')) {
                // Get value
                if (! dataset[py]) {
                    dataset[py] = [];
                }
                if (processed) {
                    dataset[py][px] = obj.records[j][i].element.innerHTML;
                } else {
                    dataset[py][px] = obj.options.data[j][i];
                }
                px++;
            }
        }
        if (px > 0) {
            py++;
        }
   }

   if (delimiter) {
    return dataset.map(function(row) {
        return row.join(delimiter);
    }).join("\r\n") + "\r\n";
   }

   if (asJson) {
    return dataset.map(function(row) {
        const resultRow = {};

        row.forEach(function(item, index) {
            resultRow[index] = item;
        });

        return resultRow;
    })
   }

   return dataset;
}
Get the whole table data

@param bool get highlighted cells only
@return array data