I tried to update an array in a collection by doing
Configs.update({_id:this.parent._id, "cles.cle":this.context.cle},
{$set: {"cles.$.alias": $(e.target).val()}});
but I got this error
Uncaught Error: Not permitted. Untrusted code may only update documents by ID. [403]
How can I update data in an array, client side (minimongo) ?
OK, I think I finally understand the basis of your question. It looks like Meteor is treating your subselection of the array element in your selection criteria as an attempt to circumvent the policy of only allowing individual record updates. This feels like a bug in Meteor.
A possible work around:
var cles = Configs.findOne({_id:this.parent._id}).cles;
cles
array as desiredConfigs.update({_id:this.parent._id},{$set: {cles: cles});
Feels clumsy. Another solution would be to create a server method to do this on the server side. This would be better if your array can be large.