I have the following excerpt:
"onclick=relatorio("+dados[i].cnpj+")"
data [i] .cnpj is a String variable, or at least it needs to be this way, however JavaScript converts the function parameter to a type number logo:
function relatorio(cnpj) {
console.log(cnpj);
}
problem: when I need to do an ajax for the bank, the values differ
question: What could you do to ensure that data [i] .cnpj continues with type string?
I am not allowed, the client to divulge CNPJs then it was censored even, but as you can see there the zero the left was concatenated when the data type was changed