Reputation: 1507
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
Upvotes: -1
Views: 213
Reputation: 94101
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
.
Upvotes: 1