Why does checkbox manipulate the true and false values coming from the background?

it is necessary to select different checkbox values and pass values to the background, but why manipulate the true and false coming from the background?

<div ng-repeat="item in ctrl.nndata">
                <input type="checkbox" ng-click="ctrl.chck(item)">
</div>

background fake data

this.nndata=[{
            paratetime: "page",
            name: "12345",
            displayname: "",
            isdranted: false,
        },{
            paratetime: "page",
            name: "12345",
            displayname: "",
            isdranted: false,
        }]
    }
  chck(data){
        let kong=this.kong=[];
        let datasss=this.nndata;
        if(data.isdranted){
            kong.map(function(ite,index){
                if(ite==data.name){
                    kong.splice(index,1)
                    datasss.map(function(dd,ix){
                        if(dd.name==data.name){
                            console.log(dd.name)
                            datasss[ix]["isdranted"]=false
                            console.log(datasss[ix]["isdranted"])
                        }
                    })
                }
            })
        }else{
            kong.push(data.name)
            datasss.map(function(dd,ix){
                 if(dd.name==data.name){
                    console.log(dd.name)
                            datasss[ix]["isdranted"]=true
                            console.log(datasss[ix]["isdranted"])
            }
            })
            this.nndata=datasss
            console.log(datasss)
        }
        console.log(kong)
        this.kong=kong;
    }
Mar.13,2021

<input type="checkbox" ng-model="item.isdranted">

isn't it good to write like this? Use map ? Why not use forEach ?

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-1b396fe-2c18d.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-1b396fe-2c18d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?