简体   繁体   中英

jquery array-like object

I have following datas:

var formFeilds={
            'text':  {
                'T1':{'required':true,'min':25,'max':55},
                'T2':{'required':true,'min':2,'max':5}
            } 
            ,'text2':5
        };
function findObj(obj){
return key,itsobj
}

I want take text1, text2 Objects and their names and related objects. For example findObj(formFeilds) would return (text,formFeilds.text AND text2,5) also findObj(formFeilds.text) would return (T1,formFeilds.text.T1 AND T1,formFeilds.text.T2) I need check returned values are object or not in jquery

I need check returned values are object or not in jquery

You can use the native Javascript typeof operator but keep in mind that almost everything is an object in JS except string|boolean|number|null|undefined .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM