I'm pulling JSON into objc and need to escape double quotes in only part of the string. I assume that I'll have to use regex but can't wrap my mind around it. Simply using stringByReplacingOccurrencesOfString:
replaces every occurrence of the double quotes.
Input (example):
[ { "name": "Bob", "formatted_name": "<p id="formattedName">Bob</p>" }, { "name": "David", "formatted_name": "<p id="formattedName">David</p>" } ]
Output:
[ { "name": "Bob", "formatted_name": "<p id=\"formattedName\">Bob</p>" }, { "name": "David", "formatted_name": "<p id=\"formattedName\">David</p>" } ]