var arr1 =['Five','Four','Full','Straight','Three','Two','One','Bust']
var arr2 = [{player1-box: "One"},{player2-box: "One"},{player3-box: "Four"},{player1-box: "Three"},{player2-box: "Three"},{player3-box: "Two"},{player1-box: "Five"},{player2-box: "One"},{player3-box: "One"}]
如上所述,我有两个数组。我的要求是比较两个数组并从第二个数组中获取第一个匹配值。在此示例中,来自 arr1 的值“FIVE”将匹配到第二个数组 arr2 的第 7 个索引中的值
意味着我会得到像 {player1-box: "Five"} 这样的键和值?有人可以调查一下并告诉我吗?
谢谢..