var a = '{"test" : "{\'test\' : \'foo\'}"}'; a = JSON.parse(a); a.test = JSON.parse(a.test.replace(/'/g,'"')) alert(a.test.test)