String Operations to Grab Value from API Response

Hi there,

We are creating an API call that generates a response from a online smartsheet. The response looks something like this:

{“id”:6718386194933636,“rowNumber”:399,“siblingId”:4774905708865412,“expanded”:true,“createdAt”:“2019-05-06T20:08:50Z”,“modifiedAt”:“2019-05-06T20:57:46Z”,“cells”:[{“columnId”:4141557109548932,“value”:399.0,“displayValue”:“399”},{“columnId”:3365712728221572},{“columnId”:3953178354968452,“value”:“Bob Vance (Test)”,“displayValue”:“Bob Vance (Test)”},{“columnId”:8456777982338948,“value”:“2019-05-06”},{“columnId”:392049171163012,“value”:true},{“columnId”:4895648798533508,“value”:true}

From here, we want to pinpoint the text we are looking for via the “display value” of the specified column id (which is static). Any help would be greatly appreciated!

you can try saving the api response in a variable and then split and trim that.

I did this already, but we need to perform additional operations in order to locate the display value. The example that I provided is a smart part in a string of over 2 million characters in which there are multiple “displayvalues” in the response but we are looking for one in particular (which is assigned to another variable which is called ROW ID). So I first saved the entire response to a variable, but I am unsure how to trim the data to look for the value that is stored in ROW ID

@mgartner so after you find the Display Value that is stored in the initial string, what do you want to do with it? Locate it based on what?

Btw, if you want to search within a string you can use initialString.IndexOf(StringToBeSearched)

You can parse this like a json response itself. Try using the Deserialize Json activity.
Then you can play around with the JObject class methods to find your corresponding displayValue with a dynamic ID.

Here are some references :

I have done this earlier. But don’t remember exactly how I drilled down to specific values.

Is there ang specific character by which the id will start?