Summing custom column values using JS query to access getDisplayedData

Hello all again!
This time I have a slightly different problem from my previous posts (Problem summing items in changesetArray), although working on the same invoicing system tables.

I have a table (tableAddLineItems) with a custom column (item_total) where I calculate the new line item total prices from the sample# x unit price when I make a new invoice. So far, so good...and my previous post went over getting to that point successfully. Summing this item totals column was fairly easy since all of the elements of that array are either in the changesetArray or newRows array (since no values are filled by default and I input them all in this case), so the following works for that:

{{ tableAddLineItems.changesetArray.reduce((accumulator, current) => accumulator + current.item_total, 0) + (tableAddLineItems.newRows['0']?.item_total ?? 0) }}`

However, for my second table (tableCurInvItems) which is for existing invoices that I now have to edit, the item totals in that column can be a mixture of existing currentSourceRow + changesetArray + newRows data, so a lot of things to add...and some are mutually exclusive (ex: need to take the changesetArray over the currentSourceRow if I change that value).

The best way to do this appears to be using the getDisplayedData function now available for tables in a JS query which will make accessible what is shown in the table column, regardless if it is coming from the currentSourceRow, changesetArray or newRows data. I can then use the query results to populate my one display component of the subtotal.

It seems to me that the following should work with Lodash sumBy (according to this:, and it does not return any errors, but it also returns nothing:

var data = tableCurInvItems.getDisplayedData();
var subtotal = _.sumBy(data, 'item_total');
return subtotal;

Regular lodash sum (with map, as instructed) doesn't work either:

var data = tableCurInvItems.getDisplayedData();
var subtotal = _.sum(, 'item_total'));
return subtotal;

Anyone have any ideas of what is wrong here? When I simply display the data/array it all looks fine:

var data = tableCurInvItems.getDisplayedData();
return data;

...this shows me the array of the displayed data correctly, with one entry that is all undefined (from the newRows data when I activate that line before saving it), but sumBy is supposed to ignore that, so shouldn't be a problem. It also works if I just have it output the value from one of the items.