有用户提问,如何从一大堆 添加的交易所中(不同币种)筛选出 实际有多少个配置的交易账号。
选出 实际 有几个交易所。
function main(){
var showArray = []
for(var i = 0; i < exchanges.length ; i++){
Log("Name:", exchanges[i].GetName(), "Label:", exchanges[i].GetLabel(), "#FF0000")
}
Log("筛选")
for(var j = 0; j < exchanges.length; j++){
var isFind = false
for(var n = 0; n < showArray.length; n++){
if(exchanges[j].GetLabel() == showArray[n].Label && exchanges[j].GetName() == showArray[n].Name){
isFind = true
}
}
if(!isFind){
Log(exchanges[j].GetLabel())
showArray.push({Name : exchanges[j].GetName() , Label : exchanges[j].GetLabel()})
}
}
Log(showArray)
}