I’m working on a project where I need to convert dynamic values into JSON format, but the keys in the JSON need to remain static. I have a string where some values are dynamically assigned, and I’d like to create a JSON object with predefined keys.
For example, given a dynamic value for “user” and “age”, I want to create a JSON object like this:
{
“name”: “John Doe”,
“age”: 30
}
Could someone please provide guidance or examples on how to effectively handle dynamic values with static keys in OpenRPA?
I agree with this one. But if you’re not familiar with .net, you can use invoke code then select any language you are proficient. Just make sure you map the variables to it as In/Out.
Your guidance was valuable, and I appreciate your time and effort in assisting me.
I need to convert data extracted from a portal into JSON format. The challenge I am facing is that the data structure may differ each time the data is extracted.
For example, the extracted data might look like this:
Export Surcharges Curr. 20STD 40STD 40HC - This is cloumn
load data into a datatable, loop over that, with for each datarow, and construct the json as string.
either create one big string with a json array inside, and then parse is using JArray.parse(jsonstring), or you can convert each “object” using the above code, and then add that to a variable of type JArray that you initialized with an empty array using JArray.parse("[]")
I’ve tried to complete the task but haven’t been able to achieve it. If you don’t mind, could you please elaborate on the flow that might help me find a solution?
I do not have access to a computer for at least 2 weeks, so I cannot help.
Maybe someone else on the forum can, else you can also get payed help from a partner.