I have the following object:
let Filmes = [{
"Nome": "Harry Potter 1",
"Preco": "50"
},
{
"Nome": "Harry Potter 2",
"Preco": "60"
},
{
"Nome": "Harry Potter 3",
"Preco": "70"
}]
let Cliente = ["Harry Potter 1", "Harry Potter 3"]
let ValorFinal = ""
How do I do this by using the Cliente
array to check what Filmes
and Cliente
do you want? And after doing this, I get back the% w /% of the movie. The output of this would be:
Final value = 120
Because the Client wants Preco
and Harry Potter 1
.
If possible in vanilla JS please