get json within js working