It will stop when it gets something that's not a string due to
while(typeof susJsonString==='string') {
susJsonString = JSON.parse(susJsonString);
as it'll keep reassigning and parsing until gets a non string back (or alternatively error out if the string is not valid json)