Converting json code fence to js