nodejs forEach或map

时间:2018-03-07 07:11:50

标签: javascript node.js loops dictionary foreach

我有一个循环问题。循环再次开始46。我无法理解问题在哪里?

代码在这里:

String CHANNEL_NAME = "person to person";
String[] PARTICIPANTS_LIST = {"27", "58"};
boolean IS_DISTINCT = true;

GroupChannel.create(CHANNEL_NAME, PARTICIPANTS_LIST, IS_DISTINCT, new                  GroupChannel.CreateListener() { 
@Override
public void onResult(GroupChannel groupChannel, ChatCampException e) {
if(e == null) {
    // New group channel has been created.
}
}
});

循环输出是:

Outsource = {key:1, value1:{
                     butce:{"fiyat":655000000, birim:"TL" }
                     projeAdi: MEBİS
.
.
.
}

Outsource.forEach((x, i)=>{
    let snc = (x.value1.butce.birim.includes("TL") ?
 parseFloat(x.value1.butce.fiyat) : 0)
    toplamButce = Number(toplamButce + snc)
    console.log(i +" // "+toplamButce.toString().length+" // "+toplamButce.toString() + " // "+ x.value1.projeAdi + " // " + snc)
})

请帮忙。感谢im Advance。

0 个答案:

没有答案