I wrote a sample code just to explain what I was after so...
Here is a working example:
var json='{"hezi":"firstName","gangina":"lastName"}',
obj=JSON.parse(json);
alert(obj.gangina);
And here is the same exact code with line breaks and tabs (just to make the code more readable since in my real code the JSON array string is HUGE):
var json=
'
{
"hezi":"firstName",
"gangina":"lastName"
}
',
obj=JSON.parse(json);
alert(obj.gangina);
I even tried to compensate with :
obj=JSON.parse(json.replace(/(\r\n|\n|\r|\t)/gm,""));
So... Technically I can solve this issue by compressing my line (removing all \r\n|\n|\r|\t manually) but I'm quite sure there is a quick fix for that regardless beautifying my code.
Small tweak needed here...
replacecall won't even be evaluated because the problem occurs earlier.