Json with methods

Good Morning!,

I have a process in which I must include a text with methods in UiPath in a JSON-type dictionary.

To test how I can do this, I am taking the value of “Now.ToString” from my JSON but it returns Now.ToString literally.

If I remove the quotes, the process fails. What I intend is for Now.ToString to return the current time and date, but I can’t get it to read it to me as a method.

The activities I use for this test are simple:

-Read text file (we read the JSON)
-Deserialize JSON (to get the JObject)
-Assign (to get assign the value to a variable)
-Message Box (to audit the result)

Thank you very much in advance.

1 Like

Hi
Kindly have a view on this for how to get the specific key value from a JSON object
Deserialize JSON

Cheers @joseignacio.prietodepaz

@joseignacio.prietodepaz

as far I do understand your post is that in your JSON are entries with method / function statements e.g.
“getCurrentDate”:“Now.ToString”

after parsing the JSON you would like to get exectuted the particular method and expecting that call yourJsonObject(“getCurrentDate”) is executing Now.ToString

Is my understanding right?