As a newcomer to javascript, I am wondering if Vue has an equivalent to LinQ. My objective is to perform the following operation:
this.selection = this.clientsComplete.Where(
c => c.id == eventArgs.sender.id);
This action would be on a collection structured like so:
clientsComplete: [
{
id: 1,
title: "Client1",
description: "Unknown",
sites: [
{ id: 1, title: "Site1-1", description: "Unknown" },
{ id: 2, title: "Site1-2", description: "Unknown" }
]
},
{
id: 2,
title: "Client2",
description: "Inconnue",
sites: [
{ id: 1, title: "Site2-1", description: "Unknown" },
...
Is it feasible to achieve this in Vue? I have yet to locate any information regarding selection in Lists within the documentation.
If there isn't a LinQ equivalent, will I need to use a foreach loop to locate my object?