I have the following code in a server code service:
code
var globalTaxItems = Collection.query(DB_id, "taxCodes", taxItemParams );
for (var m = 0; m < globalTaxItems.length; m++) {
aTaxItem = globalTaxItems[m];
myHeaderItem.taxItems.push(aTaxItem);
}
/code
menuItem.taxItems is an array field defined in the database collection. I am trying to append values to it. When I run this script it tells me that 'push' is not defined. I am guessing this means that taxItems is not an ARRAY (in the traditional JavaScript sense). Can you suggest how I can append values to this field so I can return it in the REST API that I am writing?