To make it easier to maintain, you'd better use specialized templating engine to rendering data.
To make it easier to maintain, you'd better use specialized templating engine to rendering data. Such as [Handlebars](http://handlebarsjs.com/) and [Undercore.template](http://underscorejs.org/#template).
Below is an example using [undercore.template](http://underscorejs.org/#template):