Handling create, update, and destroy for sync
If this should be executed on all properties of sync in general, i'd go with a for..in loop. 

for(var prop in sync){
  if(sync.hasOwnProperty(prop) &amp;&amp; typeof sync[prop] !== 'undefined'){
    var i=0, l = sync[prop].length;
    for (i; i &lt; l; i+=1) {
        sync[prop][i].modified.id_partenaire=false;
    };
  }
}


Otherwise, if there are more properties and this should only be applied to these 3, Esailija's answer works better.