Seems like it would be cleaner to set this string to a variable outside the loop and then use `Y.Lang.sub()` to substitute the name in when creating this `single` variable:

~~~~
var returnSet = [],
    url = 'https://manage.jujucharms.com/api/3/charm/precise/{name}/file/icon.svg';

... inside the loop ...

var name = ecs.changeSet[key].command.args[1],
    single = {icon: Y.Lang.sub(url, {name: name}), name: name};
~~~~