formats json object to styled html