I have a JavaScript array, copyCommands, that I want to push some items into. However, I can't seem to correctly add another array of items into the parent object autoGenData.
//autoGenData is the object, copyCommands is an array
autoGenData.copyCommands.push({
CopyFrom: UnitFrom,
//CopyTo: //array that needs to hold CopyOptions and Unit
});
//Need to add these into CopyTo
//CopyOptions: checkedItems,
//Unit: localUnitTo
What's the proper syntax for adding CopyOptions and unit to the CopyTo portion of the push command?
copyTo.