I have an NSString which I need to ‘clean’ before feeding it into my json read however I can’t find a way of doing so.
This is my NSString:
"DUMMY({parameters:{code:"60246", language:"en", country:"en"}, result:{"...JSON...});"
Basically I need to remove everything except: {“…JSON…}
The problem is the codes etc change?
If the string is at least consistently built in the format you gave, you could use this:
Here’s a slightly more concise, but perhaps less efficient, method: