change value in a cell

change value in a cell

Hi, I'm trying to achive this result:

I have a table with some key/value (SKU/Quantity), by a some button I add a SKU Item to table. 
Everything work fine, but If the SKU Item is in table I would like update the Quantity +1

TABLE:

| SKU |  QTY |
|A01   |    10  |
|A02   |     5   |

with my button now I add another A01 how to change the right quantity cell?

  1.  $("#comanda").find(".idart").each(function() {
  2.                     
  3.                     idPiatto = $(this).html();
  4.                     
  5.                   if (idPiatto === id) {
  6.                       trovato = true;
  7.                       riga = $(this).parent().parent();
  8.                       return false; //esco dall'each
  9.                      
  10.                   }
  11.                 i++;
  12.                  
  13.               });
  14.          
  15.               if(trovato){
  16.                   
  17.                 var inputQuantita = $(riga).find(".qta");
  18.              
  19.              var totaleRiga = $(riga).find(".totale");
  20.             
  21.             var vecchioValore = parseInt($(inputQuantita).val());
  22.             
  23.         $(inputQuantita).val(vecchioValore + 1);
  24.            
  25.              qta = parseInt($(inputQuantita).val());
  26.             
  27.              totale = prezzo * qta;
  28.              
  29.              $(totaleRiga).val(totale);
  30.              
  31.              
  32.               }
excuse for not traslate the variable :(