Js filters arrays based on obj (multiple conditional arrays)

 Users:[
                  {
                    name: "tom",
                    age:26,
                    email:"1@qq.com",
                    address:""
                  },
                  {
                    name: "tom",
                    age:23,
                    email:"2@qq.com",
                    address:""
                  },
                  {
                    name: "tom",
                    age:24,
                    email:"3@qq.com",
                    address:""
                  },
                  {
                    name: "mike",
                    age:25,
                    email:"4@qq.com",
                    address:""
                  }
                ]
let searchObj = {
  name: "tom",
  address:"",
  age:24
}

I want to output a new array. How to filter the eligible objects whose name is tom address and age > 24?

Mar.09,2021

","<"];
                    var cl = [];
                    var ret = null;
                    cc.forEach(function(item,index){
                       if(ret == null){
                         if(cond.indexOf(item)>=0){
                            var sm = cond.split(item);
                            ret = {"key":sm[0]};
                            ret.type = item;
                            ret.value = sm.length >= 1 ? sm[1] : null;
                            if(ret.value == null){ret=null;}
                         }
                         }
                    })
                    return ret;
                };                
                
                
                
                
Array.prototype.itemSelect = function(fields,where,igCase){
                igCase = typeof igCase == "undefined" ? true : Boolean(igCase);
                where = typeof where == "undefined" ? "" : String(where);
                where = igCase == true ? where.toLowerCase() : where;
                
                fields = this._killSpaceFun(fields);
                var flds = igCase == true ? this._killSpaceFun(fields).toLowerCase().split(",") : this._killSpaceFun(fields).split(",");
                
                var src_conds = this._killSpaceFun(where).split("&&");
                var obj_conds = [];
                src_conds.forEach(function(item,index){
                     var cond = obj_conds._formatFun(item);
                     if(cond!=null){
                        obj_conds.push(cond);
                     }
                });
                
            
                var _ls = [];
                this.forEach(function(item,index){
                     if(obj_conds._whereFun(item,obj_conds)){
                        if(fields == "*" || fields == ""){
                          _ls.push(item);
                        }else{
                        var _row = {};
                        flds.forEach(function(key,idx){
                           _row[key] = typeof item[key] == "undefined" ? null : item[key];
               
                          });
                       _ls.push(_row);
                       }
                     }
                });
                return _ls;
                
}

try this, the product of the test when you are bored.
use the following

var list = [{id:1,"name":"a"},{id:2,"name":"aa"},{id:3,"name":"bbb"}];
//,array.itemSelect("","")
//==:
//>=:
//<=:
//%%:%A%
//-sharp%:A%
//%-sharp:%A
//!=:
//>:
//<:

list.itemSelect("id,name","id > 1");
Menu