-2
で、私はその配列は、要素の数は戻りません気づいている:Node.jsのArray.isArray =真が、Array.lengthと=未定義
console.log('INFO : Condition: %s', JSON.stringify(entries[0].conditions))
console.log('INFO : Condition isArray - %s', Array.isArray(entries[0].conditions))
console.log('INFO : Condition cnt - %s', entries[0].conditions.lenght)
console.log('INFO : Condition[0]: %s', JSON.stringify(entries[0].conditions[0]))
var actionConditions = entries[0].conditions
console.log('INFO : Condition cnt - %s', actionConditions.lenght)
コンソール出力:
[11:15:55.679] INFO : Condition: [{"type":"state","attribute":"below","entity":"wkor2Xf3h3GQ7vnj","value":"1200"}]
[11:15:55.680] INFO : Condition isArray - true
[11:15:55.681] INFO : Condition cnt - undefined
[11:15:55.682] INFO : Condition[0]: {"type":"state","attribute":"below","entity":"wkor2Xf3h3GQ7vnj","value":"1200"}
[11:15:55.683] INFO : Condition cnt - undefined
ことができる誰かを問題/解決策を私に指摘できますか?どうも!
を試みることができます。それは長さで長さでなければなりません – blueren
このような単純なタイプミスを見つけるには、より良いIDEを使うべきです。 :) – xander
ありがとう!問題が解決しました。 IDEについては正しいですが、この場合はリモートで接続されており、viを使ってコードを編集していました:) – Martin