I need to do essentially a Vlookup (excel) or filter (if n > 1) on the data that I pulled from PapaParse.
// I know this is not asynchronous...
function filteredData(err,filterkey,data,wantedColumn) {
if (err) console.error(error);
t = [];
for (i=0;i< data.length;i++;) {
if (data[i][0] == filterkey) t[t.length] = data[i][wantedColumn];
}
return t;
}
Is there a quicker better way than going through all data everytime that I want to check on a key? My data is sorted in column[0] on my key. (There must be many easier ways, but is there a built in way?)
I parsed my data with headers so I have an array of objects rather than just an array (but I could change that it's not essential for my use case).