Imagine I am working with a collection that contains 3 items:
[
{
id: 'x',
elements: [10, 20, 30]
}, {
id: 'y',
elements: [40, 50, 60]
}, {
id: 'z',
elements: [70, 80, 90]
}
]
In my JavaScript code, I have an array [50, 20, 60, 40, 70, 80]
. How can I construct a query to specifically choose the second object from the collection since my array includes all the numbers (40, 50, and 60) in its elements
array?