index from json to js