Vue circular array problem for

the previous code required five selectGame.id parameters, so I used the stupidest method. Now the requirement is 1-10.
mylotteryList1 and selectGame both have id, corresponding to each other.
my previous idea was to push the group of data in mylotteryList1 into collectionList as long as the id, of selectGame is included in mylotteryList1.
how can I change it?

for(let j=0;j<this.mylotteryList1.length;jPP){
    let gid = this.mylotteryList1[j].Id
        if(gid==this.selectGame[0].Id||gid==this.selectGame[1].Id||gid==this.selectGame[2].Id||gid==this.selectGame[3].Id||gid==this.selectGame[4].Id){
            this.collectionList.push(this.mylotteryList1[j])
        }
 }
Aug.16,2021

the front ends are all ES2018 , so many beautiful and intuitive syntax candies are not needed. It's speechless to see this ugly for j for i .
es6 is a line

.
this.collectionList.push(...this.mylotteryList1.filter(lottery => this.selectGame.some(game => lottery.Id === game.Id)));

for(let j=0;j<this.mylotteryList1.length;jPP){
    let gid = this.mylotteryList1[j].Id
    for(let i = 0;i< this.selectGame.length;iPP){
        if(gid === this.selectGame[i].Id){
            this.collectionList.push(gid)
            return
        }
    }
}
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3ff52-2c4db.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3ff52-2c4db.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?