Modified controller.js to create output for html content from the json file