Getting table data, including edited items, all in one array/object

I've constructed a table using checkboxes as a way to make edits. I'm now trying to figure out how to get the fully new constructed data to use as an update query.

console.log(table.data) looks like this

1. (16) [Array(2), Array(2), Array(2), Array(2), Array(2), Array(2), Array(2), Array(2), Array(2), Array(2), Array(2), Array(2), Array(2), Array(2), Array(2), Array(2)]

  1. 0: (2) ['useFlightWeight', true]
  2. 1: (2) ['contentdb', true]
  3. 2: (2) ['keywordReporting', true]
  4. 3: (2) ['userdb', true]
  5. 4: (2) ['indexedCandidatesEngineSolr', true]
  6. 5: (2) ['disableImpressionExpiration', false]
  7. 6: (2) ['a0x', false]
  8. 7: (2) ['gdpreverywhere', false]
  9. 8: (2) ['logSplitting', false]
  10. 9: (2) ['microBudget', true]
  11. 10: (2) ['strictFreqCapping', false]
  12. 11: (2) ['tetherEventUrlRegion', false]
  13. 12: (2) ['writeCreativeMetadataToSelectionLog', false]
  14. 13: (2) ['userdbAuthRequired', false]
  15. 14: (2) ['decisionAuthRequired', false]
  16. 15: (2) ['eventAuthRequired', false]
  17. length: 16

console.log(table.recordUpdates) look like this:

1. (2) [{…}, {…}]
  1. 0: {0: 'tetherEventUrlRegion', 1: true}
  2. 1: {0: 'writeCreativeMetadataToSelectionLog', 1: true}

I can't seem to find a table property that will give me the fully (combined) list. Is there something I am missing ? Or do I have to parse through and compare and construct the full update list myself?

Hey @Carol_Scheible!

I don't know that there's a single property that will give you exactly that, but you might try mapping the table's change set onto its data with something like {{table.data.map((row, i) => Object.assign(row, table.changeSet[i]))}}. Does that work?

OMG, yes, this worked and much more elegant than my klunky loops! Thanks!