List of String to Dictionary/JObject

Hello everyone!

I am using an activity with a Database, in which I receive some data as List. I can’t modify the way I receive this data.

An example of this data would be:

{
“id_expediente”: “12345”,
“nif”: “56789”,
“id programa”: “3”,
“DNI”: {
“FASE2-REV-RPA1”: {
“info”: “DNI/NIE”,
“NOTA”: “Debe coincidir con los datos de la solicitud”,
“Dato”: “nif”,
“Evaluar”: {
“Tipo”: “COINCIDE”
},
“Cumple”: “OK”,
“No cumple”: “SUBSANACION”,
“Estado”: “PENDIENTE”,
“Fecha estado”: “”,
“Historico estados”:
}
}

As you can see, there is some nested json inside. I would like to transform this list of String into some jobject or dictionary, so I can loop into it to get the data inside.

Anybody can help? Thank you very much!

Hi @Gmar,

Save the received data in a string and then parse it to convert into JObject.

Use Newtonsoft.Json.Linq.JObject.Parse(stringReceived)

Hi @Gmar

Store the above data in a string variable let say str
use deserilize json activity available from UiPath.Web.Activities which helps to convert the string into Jobject

Use for each activity with specific argument type to loop through each values in jobject
e
Hope it helps

Regards
Nived N
Happy Automation