It seems that your code should be:
JSON.parse('["foo", "bar\\\\"]');
Your Json object is indeed ["foo", "bar\\"] , but if you want it to be represented in JavaScript code, you need to output the \ characters again, thus having four \ characters.
Yours faithfully
source share