How to update a single item inside repeatable component using id of that item

I have this repeatable Variants component inside Product and I want to update a single variant or item using its id

I am trying like this

    const updatedVariants = => {
      if ( === {
        return {
          Quantity: variantInMap.Quantity - item.Quantity,
      return variantInMap;

    const res = await strapi.entityService.update(
        data: {
          Variants: updatedVariants,

But with this I cant provide the updated Variants to next iteration

This topic has been created from a Discord post (1217875092005060759) to give it more visibility.
It will be on Read-Only mode here.
Join the conversation on Discord

For components you need to give it all information else it will delete the old repeated function