
var parent={};
parent.showgame_table=function(){
	this.result=[];
	
	for(let index in this.GameFT)
	{
		var item=this.GameFT[index];
		var col_length=item.length;
		var tmp={};
		tmp.league_id=item[0];
		tmp.start_time=item[1];
		tmp.league_name=item[2];
		tmp.league_subname=item[3];
		tmp.dcount=item[5];
		tmp.game_type=item[col_length-1];
		var sub_len=col_length-7;
		var tnum=Math.floor(sub_len/4);
		var start_subindex=6;
		var subindex_start=0; 
		var subitems=[];
		while(subindex_start<tnum){
			 let sitems={};
			 let cstart=start_subindex+(subindex_start*4);
			 sitems.status=item[cstart].replace(/[\r\n]/g,"");
			 sitems.code=item[cstart+1].replace(/[\r\n]/g,"");
			 sitems.name=item[cstart+2].replace(/[\r\n]/g,"");
			 sitems.odds=item[cstart+3].replace(/[\r\n]/g,"");
			 sitems.enabled=1;
			 if(parseFloat(sitems.odds)<=0){
				 sitems.enabled=0;
			 }
			subitems.push(sitems);
			subindex_start++;
		}
		tmp.items=subitems;
		this.result.push(tmp);
	}
	console.log(JSON.stringify(this.result));
}

#CONTENT#