I'm following the guide here on how to parse JSON response from a REST call to sharepoint: Parsing JSON returned from a REST service in Nintex workflow. It works as expected when the values being extracted do not contain double quotes. The problem happens when there's a double quote in the string I am extracting.
Regex used: (?<="title":")([^"]*)(?=")
Scenario 1: No double quotes
Data to process: {"d":{"results":["title":"This is a title"]}}
Result: This is a title --> Passed
Scenario 2: With double quotes
Data to process: {"d":{"results":["title":"This is a ""pseudo"" title"]}}
Result using the regex above: This is a --> Failed
I tried a lot of regex combination to handle such cases but when I try it using "Run Now", I get this result: [Command executed successfully.]
How do I handle such cases? I need to extract the whole string first before handling character escaping. I tried looking for other helpful tips but I can't make them work as well: Parse JSON Custom Action.
Environment:
- SharePoint 2013
- Nintex Workflow (on-premise)