Bulk upsert query from table

I have multiple small tables connected to postgres queries in my app, mainly to control some default parameters like statuses, document types, suppliers, etc. Those tables are being used to populate dropdown values with default values.
image

Now I want an easy method to modify those values (change names/descriptions) and also to add new rows/values. So I've made the column status editable and added the "add row" button to the toolbar.

On save it should do a bulk upsert using the table.newRows to add new rows and using the table.changesetArray to modify any edited rows.
I am able to create to separate functions, thus insert a new row and another function to update existing rows. This however requires the user to do those actions separately. Which for sure is going to cause issues as people will update and add rows in one go,

How can I achieve that my query does a bulk upsert? Therefor I should combine the date form newRows and changesetArray before running the query?

I've tried push and concat to append the data, but for some reason this won't work.
image
It's creating 2 arrays withing changeArray

[
  [
    {
      "status": "new status"
    }
  ],
  [
    {
      "status": "Changed row",
      "id": 7
    }
  ]
]

How to solve this?

It sounds like newRows and changesetArray are arrays. If you push an array into an array then you'll have arrays in arrays like your screenshot. Instead do

changeArray.push(...table2.newRows);
changeArray.push(...table2.changeSetArray);

or both at once with
changeArray.push(...table2.newRows,...table2.changeSetArray);

@julius_jet , thanks, that did help.