このような多次元の JavaScript 配列があります。
[
["9", "16", "19", "24", "29", "38"],
["9", "15", "19", "24", "29", "38"],
["10", "16", "19", "24", "29", "38"],
["9", "16", "17", "19", "24", "29", "39"],
["10", "16", "17", "19", "24", "29", "39"],
["9", "15", "21", "24", "29", "38"]
.......
.......
]
正確には40前後
そして、次の値を持つcheckと呼ばれる別の配列を持っています
[9,10] //This is of size two for example,it may contain any number of elements BUT it only contains elements(digits) from the multidimensional array above
私が欲しいのは、チェック配列要素に基づいて多次元配列を一意にする必要があることです
1.チェック配列が次の場合の例[15]
多次元配列は次のようになります
[
["9", "15", "19", "24", "29", "38"],
//All the results which contain 15
]
2.チェック配列が次の場合の例[15,21]
多次元配列は次のようになります
[
["9", "15", "21", "24", "29", "38"]
//simply containing 15 AND 21.Please note previous example has only 15 in it not 21
//I need an AND not an OR
]
JavaScript の IndexOf メソッドを試してみましたが、AND ではなく OR された結果が得られます
前もって感謝します