$test_data = {
    "MACHINE": "A01",
    "STATUS": "ENGTEST",
    "TXN_TIME": "2020/09/17 00:04:15",
    "AVAINFO": [
      { 
        "RECIPE": "8EX-001",
        "ava": "Z03341#25#A9161#P#Z03934#5#A9021#P"
      },
      {
        "RECIPE": "8EX-005",
        "ava": "Z80597#3#B3542#L"
      }
    ],
    "ID": "1"
  }
function format ( d ) {
    // `d` is the original data object for the row
  //console.log(d);
  var tr = '';
  
  d.AVAINFO.forEach(function (item) {
    var  phase = item.ava.split("#");
    console.log(phase);
    
                
  tr += '<tr>'+
            
            '<th>Recipe</th>'+
'<th>Lot_ID</th>'+
  '<th>Foup</th>'+
  '<th>Location</th>'+
  '<th>Pri.</th>'+
  '<th>Due_Day</th>'+
  '<th>Qty</th>'+
  '<th>Cus</th>'+
  '<th>T-ID</th>'+
  '<th>Type</th>'+
  '<th>Flow</th>'+
  '<th>Sub</th>'+
  '<th>Spec</th>'+
        '</tr>'+
        '<tr>'+
            '<td>'+item.RECIPE+'</td>'+
            '<td>'+phase[0]+'</td>'+
            '<td>'+phase[1]+'</td>'+
            '<td>'+phase[2]+'</td>'+
            '<td>'+phase[3]+'</td>'+
        '</tr>';
  });
  
    return '<table zcellpadding="5" cellspacing="0" border="0" style="padding-left:50px;" display="inline">'+
      tr +
      '</table>';
}
1 error
Line 16: Missing semicolon.
Output 300px

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers