String Value from SF result

Hello, I’m trying to grab the value from a result from Salesforce and it’s a string of an array of objects. I would like to get the value from Name? How can I use string manipulation or do I have to turn this into an array and then …? Thanks in advance?
[
{
“new”: [
{
“attributes”: {
“type”: “Account__c”,
“url”: “/services/data/v54.0/sobjects/Account__c/a078c040cjdk0ihMKgAAM”
},
“LastModifiedDate”: “2022-03-01T16:35:54.000+0000”,
“IsDeleted”: false,
“OwnerId”: “0058c000007rMGrAAM”,
“CreatedById”: “0058c000007rMGrAAM”,
“CreatedDate”: “2022-03-01T16:35:54.000+0000”,
“Id”: “a078c00000ihMKgAAM”,
“LastModifiedById”: “0058c000007rMGrAAM”,
“Name”: “Victor Smith”,
“SystemModstamp”: “2022-03-01T16:35:54.000+0000”
}
],
“old”: [

],
"userId": "0058c000007rMGrAAM"

}
]

Or is this just Json in an array?

Hi @Fred_Fishbein

This looks like a json object.

You can deserialize it with UiPath.WebAPI.Activities, then use a key value pair syntax to retrieve the Name key value.

i.e. jsonobj("Name").ToString

Kind Regards

give a try on:

Parse the JSON String with Deserialize JSON Array - myJArray

give a try for retrieving the first name by

strName = myJArray(0)(“new”)(0)(“Name”).Value(Of String)

If you can share a better JSON Sample we could better crosscheck at our end

Based on given input we assume:

Thank you Che. Big help. They both were helpful

Thank you Peter that did the trick.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.