template apply with json data