Create a json object from html templates