3
I believe it’s a simple question but I’m not finding a solution to my problem.
Example:
Object:
{projectId:"1" name:"Projeto A" image:"imagem.jpg"}
{projectId:"2" name:"Projeto B" image:"imagem.jpg"}
{projectId:"3" name:"Projeto C" image:"imagem.jpg"}
{projectId:"4" name:"Projeto D" image:"imagem.jpg"}
{projectId:"5" name:"Projeto E" image:"imagem.jpg"}
I have a menu in which I am already picking up the value of the id and would like to do a search on this object through this id to load the correct image.
$('.btn').on({
mouseenter: function () {
$id = ($(this).attr("id"));
}
})
Thank you very much :)
Which property does the ID? filter to find only one or a few within this array?
– Sergio
you can use the filter property of the array
– Voltz
That, as the value comes in $id, I want to filter that array and identify which node it belongs to.
– Fernando Dias Motta