i do look for contain(product & size) in ShoppingCart array
if product is not in ShoppingCart array → i do add(object) to ShoppingCart array, that works
if product is in ShoppingCart array → i want to update object.amount +1
I try different methods and nothing works (setKeyValue, remove current and add new object where amount +1 etc and I have some errors). I understand that i’m doing something wrong)
Is there any best practice to do that in WeWeb easily? Maybe there is example or tutorial somewhere?
The index can also be there from the context if you are inside a repeat.
This feature is more and more asked (changing a subpath inside a variable) so I added it to our features to watch
Hi, can you explain how to do the index? I am trying to do the same function ( shopping cart, adding items and quantity to new array) and cannot figure out how
If you want to lookup stuff like this, search google or stackexchange for things like javascript set array value. You’ll get tons of resources there as well.