remove object from DataColection while $init

Hello,
i have a big object to be loaded into a datacollection.
This object has some useless data that I’d like to remove from the datacollection.

I’ve tryed this method:

export function getAllAirlines() {

if (allairlines)
	return allairlines;

var data = webix.ajax().get("https://raw.githubusercontent.com/npow/airline-codes/master/airlines.json");

    allairlines = new webix.DataCollection({
        data: data,
        scheme: {
            $init: function (obj) {
				let temp = obj;

				obj.id = temp.iata;
				obj.value = temp.name;

				delete obj.name;
				delete obj.alias;
				delete obj.callsign;
				delete obj.country;
				delete obj.active;
				}
            }


    });

		console.log(allairlines)

return allairlines;
} 

But if I want to remove the entyre object how can I do?
If I assign null to obj, it removes all the next entries.

...

    allairlines = new webix.DataCollection({
        data: data,
        scheme: {
            $init: function (obj) {

                                //BY ADDING THIS
                                if(obj.iata === "") 
                                   obj = null;
                                
                                 ...
 
				}
            }


    });

console.log(allairlines) //i get only 2 record 

return allairlines;
} 

If I assign null to obj, it removes all the next entries.
probably you do some operations with null object, which leads to the error breaking next steps.

to remove unrequired items you can filter data promise

new webix.DataCollection({
    data: data.then(data=>data.json()).then(data=>data.filter(obj=>{
        if(!obj.meet_conditions){
            return false;
        }
        // also you can do all scheme->$init operations here
        return true;
    }))
})