You need a repeat in your form and add 2 hidden inputs there one for product id and one for the quantity.
Example:
<form ...>
<div is="dmx-repeat" id="repeatItemsCart" dmx-bind:repeat="dsCart.data.reverse()">
<input id="product_id" name="product_id" dmx-bind:name="repeatItemsCart[{{$index}}][product_id]" type="hidden" dmx-bind:value="prd_id">
<input id="product_qty" name="product_qty" dmx-bind:name="repeatItemsCart[{{$index}}][product_qty]" type="hidden" dmx-bind:value="quantity">
...
other info here
...
</div>
</form>
Then in your server action you have these available as:
so you can do whatever you like with them - filter a query, get product price, details etc. then insert data wherever is needed.
But this is basically what you do with the form repeat component - so follow the tutorial Inserting Data in Main and Sub Table using App Connect Form Repeat