1
I’m researching a solution to a problem and I haven’t found anything I could understand, so far,
I have a csv file that contains the data in this format:
0111-3/01,"Cultivation of rice"
On the left is the code, and on the right is the description, separated by a comma.
The file has more than 2 thousand lines.
What I need:
The user types the code in the html field, then the function searches the.csv file for that code, and returns the description. It would be something like:
$("#idInputCódigo").focusout(function(){
//abre arquivo csv que está junto com os arquivos do sistema na pasta _CSV
arquivo = open(_CSV/arquivo.csv); //função inventada
for( i = 0; i<quantidade de linhas; i++ ){
//alguma forma de percorrer o arquivo até encontrar o código correspondente e retornar a descrição
}
I don’t know if there is any library in javascript that facilitates this, anyway, all help is welcome.
Thank you in advance.