0
How to do excel Procv function in javascript;
Ex:
I have a table with 2 columns (name and code) and I have a list with only names, I need to go through this list with names and bring the code corresponding to each name according to my table cited above .
Table
Nome Codigo
João 340
Lucas 200
Tiago 120
List
['João','Lucas','Tiago']
I need to bring the codes corresponding to each name on that list .
I have a impassable in the following situation
I have 2 different json with 1 property in common. In this case both have common number. I need to verify that the Json2 number is equal to the Json 1 number, if they are equal to the Json2 and Json1 Code.
Json1 = [{"Codigo":1233123,"Numero":12345},
{"Codigo":5345345,"Numero":45678},
{"Codigo":34234,"Numero":8907},
{"Codigo":423453,"Numero":340}]
Json2 = [{"Numero":12345,"Nome":'Tiago'},
{"Numero":45678,"Nome":'Joao'},
{"Numero":8907,"Nome":'Paulo'},
{"Numero":340,"Nome":'Maria'}]
You look for a JS function that does what excel PROCV does, that’s it?
– BrTkCa
I think you will need to provide more details. Edit your question, exemplify your problem in Javascript. The way your question is, only those who know Excel can try to infer more or less what you want. Focus on the problem (if you.
– Luiz Vieira
yes Lucas Costa
– Thalles Honorato
Ok, better. I took my vote to close. Still, it would be good to make it clear what kind of table this is. Is it a JSON file? Is it an HTML table? Otherwise whoever’s interested in helping you needs guess what it is. Make your life easier by facilitating who will help you.
– Luiz Vieira
@Lucascosta would have a solution to the situation with Json ?
– Thalles Honorato
Still in trouble @Thalleshonorato? I wonder why you even answered your question with the solution.
– BrTkCa
@Lucascosta unfortunately I erred in some aspects in the question, it is reformulated if possible analyze , I need to make the comparison between Json ,
– Thalles Honorato