I have an array named files:
files = [
{
id: "1",
title: "aras",
price: 100,
size: 25,
tools: [
"Hammer",
"Zip",
"Line",
"Nexti"
]
},
{
id: "2",
title: "yasio",
price: 150,
size: 30,
tools: [
"Hammer",
"Zip",
]
},
{
id: "3",
title: "janio",
price: 200,
size: 30,
tools: [
"Line",
"Nexti"
]
},
{
id: "4",
title: "chashio",
price: 400,
size: 35,
tools: [
"Nexti"
]
},
]
I want to filter this object, for example, to get the array: prices between 90 to 150 and sizes between 25 to 40 and tools to include Hammer and Zip.
output must be:
{id: "1", title: "aras", price: 100, size: 25,tools:[...]},
{id: "2", title: "aras", price: 150, size: 30,tools:[...]},
{id: "4", title: "aras", price: 90, size: 40,tools:[...]},
How can i do it?