You should be able to replace the string/string constraint. Here is a panel that shows the different ways you can replace the different types of constraints.
If you look at the second one String Key/Value Constraint it should be what you are looking for.
One
Two
Three
Four
Five
zero
ten
twenty
thirty
forty
zero
one
two
var choices = new Array();
choices[0] = 'One';
choices[1] = 'Two';
choices[2] = 'Three';
choices[3] = 'Four';
choices[4] = 'Five';
var newCon = params.createStringChoiceConstraint(choices);
params.replaceConstraint(“choiceString”, newCon);
var choices = new Array();
choices[0] = ‘Un’;
choices[1] = ‘Deux’;
choices[2] = ‘Trois’;
choices[3] = ‘Quatre’;
choices[4] = ‘Cinq’;
var newCon = params.createStringChoiceConstraint(choices);
params.replaceConstraint(“choiceString”, newCon);
var newValues = []
newValues.push({"key": "1", "value": "one"});
newValues.push({"key": "2", "value": "two"});
newValues.push({"key": "4", "value": "four"});
newValues.push({"key": "8", "value": "eight"});
newValues.push({"key": "16", "value": "sixteen"});
var newCon = params.createStringStringChoiceConstraint(newValues);
params.replaceConstraint(“keyChoiceString”, newCon);
var newValues =
newValues.push({“key”: “0”, “value”: “zero”});
newValues.push({“key”: “10”, “value”: “ten”});
newValues.push({“key”: “20”, “value”: “twenty”});
newValues.push({“key”: “30”, “value”: “thirty”});
newValues.push({“key”: “40”, “value”: “forty”});
var newCon = params.createStringStringChoiceConstraint(newValues);
params.replaceConstraint(“keyChoiceString”, newCon);
var choices = new Array();
choices[0] = ‘A’;
choices[1] = ‘B’;
choices[2] = ‘C’;
var choiceConstraint = params.createIntChoiceConstraint(choices);
params.replaceConstraint(“choiceInt”, choiceConstraint);
var choices = new Array();
choices[0] = ‘one’;
choices[1] = ‘two’;
choices[2] = ‘three’;
choices[3] = ‘four’;
choices[4] = ‘five’;
choices[5] = ‘six’;
var choiceConstraint = params.createIntChoiceConstraint(choices);
params.replaceConstraint(“choiceInt”, choiceConstraint);
var rConstraint = params.createIntRangeConstraint(1,10);
params.replaceConstraint("rangeInt", rConstraint);
var rConstraint = params.createIntRangeConstraint(1,50,5);
params.replaceConstraint("rangeInt", rConstraint);
var rConstraint = params.createIntRangeConstraint(0,100,1000,1100,10);
params.replaceConstraint("rangeInt", rConstraint);