Is there a way to search for all elements in an array and display them if they are all present? For instance, consider the following:
const data = [
{
"languages": ["JavaScript"],
"tools": ["React", "Sass"]
},
{
"languages": ["Python"],
"tools": ["Vue", "Sass"]
},
{
"languages": ["JavaScript"],
"tools": ["Vue"]
}
]
const newArr = ["Html","CSS"]
const newJobs = data.filter((item) => item.languages.includes(...newArr) || item.tools.includes(...newArr))
Although this solution provides results for each element, I am looking to evaluate all of them collectively.
(Please note that the code provided is just an example and the actual file contains more data, including Html and CSS)