There are 2 arrays in the array. There are objects in them. How can I find the one whose name is "Sneijder"?
const players = [
[
{
id: 1,
name: "Hagi",
},
{
id: 2,
name: "Carlos",
},
],
[
{
id: 3,
name: "Zidane",
},
{
id: 4,
name: "Sneijder",
},
],
];
players.flat().find(x => {return x.name=="Sneijder"})