Looping through table changes and triggering a SQL query

@pyrrho i meant, i need to loop sql query

for example i have table1, it has 3 columns. if user changes every cell under that columns, changesetObject can catch them, and if i loop that object for everychanges and integrate it with my sql query, then i can insert everychanges into my another table. i mean i want to run mysql query based on the size of changesetObject and for each loop i want to inject next value of changesetOject. here is MySqlQuery.

INSERT INTO mr_audit_log_retool (entity_id, 
                                 table_name, 
                                 field_name, 
                                 previous_value, 
                                 new_value,
                                retool_user)
VALUES
  ('{{table1.changesetArray[0].buchungId}}', 
   '{{mr_bookings.id}}', 
   '{{Object.keys(table1.changesetObject[1])[0]}}', 
   '{{MyJavaScriptQuery.data.find(
  x=>x.buchungId === table1.changesetArray[0].buchungId)[Object.keys(table1.changesetObject[1])[0]]}}', 
   '{{table1.changesetObject[1].buchungEnde}}',
  {{current_user.id}});

but MyJavaScriptQuery.data does not return anything.
and here is MyJavaScriptQuery

let obj= table1.changesetObject[1];


const orgs = await new Promise((resolve) => {
  MySqlQuery.trigger({
    additionalScope: {
      field_name: Object.keys(table1.changesetObject[1])[0]
    },
    onSuccess: (data) => {
      resolve(data);
    },
  });
});

return orgs;

but MyJavaScriptQuery.data does not return anything