I am having a small issue with variable assignment. For some reason my line variable doesn't properly assign.
var records = new Array();
var recid = -5
var subrecid = 6495;
var line = new Array();
line['recid'] = recid;
line['subrecid'] = subrecid;
if (subrecid > 0) records.push(line);
var line = {}; line.recid = recid; line.subrecid = subrecid;instead.