adding js to generate json.