Single quotes around expansions ?  e.g. "key = '$(this.k)'", to make empty values clearly empty.