Advertisement
vitareinforce

loop filter

Jun 9th, 2020
877
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. init:
  2.  
  3.     //loop dulu data di tabel
  4.     let hasilfilter = [];
  5.     for(var i = 0; i < this.inventory.Length; i++) {
  6.         for(var j = 0; j < this.userData.AccessSettings.Length; j++) {
  7.             if((this.inventory[i].LegalEntityId == this.userData.AccessSettings[j].Id) && (this.inventory[i].BranchId == this.userData.AccessSettings[j].Branches.Id)) {
  8.                 hasilfilter.push(this.inventory[i])
  9.             }
  10.         }
  11.     }
  12.  
  13.     //pake hasil filternya bwt ntr ke ngisi tabel
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement