Use safe parse JSON javascript method