How Change value of button dynamically?

I have that structure and after insert some data in the db i want to change the name of the button to “modify” instead of “add”, anyone knows how to achieve this, i try getItem, setItemValue, and many other but don’t work and can’t find a specific example.

form_1_struct =
   [{      
       {type: "button", name: "add", value: "add"} 
    }];

Hello

Try this:

myForm.setItemText("add","midify"); // 1st param - button name // 2nd - text