How i make this?
const arrays = [
{ servername: "MyServer", owner: "Evelyn" },
{ servername: "Minecraft Server", owner: "Maria" },
{ servername: "You really are reading this? xd", owner: "RaymondG" }
];
const Data = arrays.find(data => data.servername.includes("a"));
// Result: { servername: "Minecraft Server", owner: "Maria" }
// I want get this: [{ servername: "Minecraft Server", owner: "Maria" }, { servername: "You really are reading this? xd", owner: "RaymondG" }];
In summary, I would like to know how to obtain the data of an Array that contains certain requirements, I have tried with for-of, but the problem with this is that with large data, it usually takes a long time…