I have a request forming using the JSON Object something like this:
let formData = {
name: classifierName,
fire_positive_examples: {
value: decodedPositiveExample,
options: {
filename: 'positive.zip'
}
},
negative_examples: {
value: decodedNegativeExample,
options: {
filename: 'negative.zip'
}
}
};
I want to inject a dynamic value from String instead of fire_positive_examples.
When trying to append a String, something like let classNamePositive = className + '_positive_examples'; and have classNamePositive instead of fire_positive_examples, it instead has dynamic value it injects classNamePositive.