There is a local JSON object that needs to be update. The quantiy below needs to be incremented by 1.
Here's what I tried:
int quantity = jsonDecode(itemsInCart[i])['quantity'];
quantity++;
jsonDecode(itemsInCart[i])['quantity'] = jsonEncode(quantity);
But this does not work. Please help !