0

I am trying to make a addjsonbody which expects a string at start but the string name changes due to poor architecture, i have been trying get set the string infront this value get picked up on script start i can store it in as a value but i need it as the string name.

createasset newAsset = new createasset();
                newAsset.organization = org;
                newAsset.location = loc;
                newAsset.name = newName;
                newAsset.customname1 = "value1";
                newAsset.customname2 = "value2";
                newAsset.customname3 = "value3";

request.AddJsonBody(newAsset);

i want to be able to change the name of customname1.

  • what is the question? are you looking for a library? a way to do it? when is it supposed to change? in runtime? between builds? Please improve your question. – Idov Sep 12 '19 at 10:37
  • I want to be able to change the string name like i change the value of the string or a way to create a string then be able to put a value inside the string during runtime. – Onur Akbas Sep 12 '19 at 12:22
  • Possible duplicate of [Newtonsoft JSON dynamic property name](https://stackoverflow.com/questions/37917164/newtonsoft-json-dynamic-property-name) – Idov Sep 12 '19 at 17:51

0 Answers0