[Solved] How can i display more than one array elements that satisfy a condition?


Use filter instead of find:

The filter() method creates a new array with all elements that pass the test. While The find() method returns the value of the first element

searchEnseigne(){
    let server = this.products.filter(x => x.enseigne === "McDonalds");
    console.log(server);
}

0

solved How can i display more than one array elements that satisfy a condition?