Issue with table localstorage bulk insert

Hi i have this form

when i click add line it adds a new line in the table using localstorage (that works good) after i press Generate button it should take in this example the 2 records and insert them into a table as diff records or rows.

i created a transformer like this:

but in transformer.value i got this


im getting repeated number in qty

what im doing wrong?

thank you

Hey @agaitan026!

It looks like you're always referencing the first row of the table by writing {{['0'].qty }}. Since the item variable is already a reference to the row of data you're working with you might try something like this:

items.forEach(item => {
      quantity: item.qty,
      product_id: item.product_id,
      // ... etc.
1 Like

works perfect thanks!