これらの最も内側の配列は[1]
、配列の実際の形式が次のとおりであると仮定して、内部配列の最初のセットのインデックスにあります。
// Note the commas between the inner elements which you don't have above.
var a = [['1',[0]],['2',[0]],['3',[0]],['4',[0]]];
ですから、あなたはもうすぐそこにいます。ではなくa[i][1][0]
、それにアクセスしてインクリメンタルする必要があります。++
+= z
例:
console.log(a[1][1][0]);
// 0 (at element '2')
// z is the string value you are searching for...
for(var i=0; i < a.length; i++) {
// Match the z search at a[i][0]
// because a[i] is the current outer array and [0] is its first element
if(a[i][0] == z) {
// Increment the inner array value which is index [i][1][0]
// Because the 1-element inner array is at [i][1] and its first element is [0]
a[i][1][0]++;
}
}
だからz = '2'
:
// Flattened for readability:
a.toString();
// "1,0,2,1,3,0,4,0"
//-------^^^
次にz = '4'
:
// This time the '4' element gets incremented
a.toString();
// "1,0,2,1,3,0,4,1"
//-------^^^-----^^^
これがjsfiddleのデモです...
更新:これは、更新された値が存在する場所です。

はのArray[1] 0: 1
増分値ですz == '4'
。