In my app I have a cart that is using a data store.
I have multiple lines like:
{"records":[{"$id":1,"product_id":"4","product_name":"Planche de SUP","date_start":"2024-09-27","date_end":"2024-10-04","qty":2,"unit_price":15,"total_price":240},{"$id":2,"product_id":"4","product_name":"Planche de SUP","date_start":"2024-09-27","date_end":"2024-10-04","qty":2,"unit_price":15,"total_price":240}],"lastid":2}
In a page I need to be able to get the quantity (qty) of product_id=4 or any other id
Is there an easy way of doing this? I have written a js function but I would prefer to use wapppler's components.