JsRender lets you pass any data you want to the render method, and also lets you pass helper methods and metadata etc in the additional context parameter:
myTemplate.render(data, context)
The API documentation for the render method is here
From the template you access the properties or methods of the context object as ~someProperty
or ~someMethod(...)
.
But you might consider using JsRender to render your whole content, not just the options. And if you use JsViews then you don't need to write code to append or remove DOM elements. It can just work declaratively.
There is a really simple example here Data-linked tags, and many more here: JsViews samples.
You might be interested in this page (more advanced) too - since it shows how sometimes you have a choice about inserting IDs or using alternative approaches where that is no longer necessary...