How do I update the html inside a variable

How do I update the html inside a variable

Hello, I have the following html inside a variable:

  1. <tbody><tr class="contract"><td style="width: 25%"></td><td style="width: 25%"></td><td style="width: 25%"></td><td style="width: 25%"></td></tr><tr><td colspan="1"><input type="hidden" id="radio42918" visiblecondition="" mandatorycondition="" class="radio-values"><span class="prompt42918"><label class="prompt-label prompt42918" colspan="1" itemid="42918">Radio<label class="mandatory-text-sign hide-item">*</label></label></span></td><td colspan="1"><input id="response43089" type="radio" name="radiogroup42918" itemid="43089" parentid="42918" class="radio-button-input prompt42918"><label for="response43089" class="radio-button-label prompt42918">OK</label></td></tr></tbody>
I am trying to update the input hidden in there, but I am not managing to do so.
So far, I've done this to get the hidden variable

  1. var hiddenHolder = jQuery(groupContent.html()).find("input#radio" + child.parentId);
It is a loop, that is why i added radio + child.parentId.
After this point I am lost. I've been googling to see how to fit it again in the groupContent html, since it will be passed to the next function.

My goal is to have stored in this groupContent.html() the same thing that was there before, but with the property visibleCondition and mandatoryCondition updated.

Thanks