Put templates content to JS object