In object, i have same keys in multiple instance, but the value is different like "string" / "object" - how to find the value and make a condition to go for different tasks..?
here is my object and try:
var obj = {
"Home":"Home link",
"Assignments":"Assignments link",
"Explorer":"Explorer link",
"Assignments":{
"Projects":"Projects sub string",
"Background Jobs":"Background sub string",
"Workflow Engine Queue":"Workflow Engine Queue sub string",
"Filter Engine Queue":"Filter Engine Queue sub string",
"Quotes":"Quotes sub string",
"Issues":"Issues sub string"
},
"Explorer":{
"Term Databases":"Term Databases sub string",
"Translation Memories":"Translation Memories sub string",
"Personal Preferences":"Personal Preferences sub string",
"Manage Locale":"Manage Locale sub string"
}
}
var objetProcess = function(){
$.each(obj, function(key, value){
console.log(key,$.type(value));
})
}
objetProcess();
I am looking to loop the entire object and find the value is "string" or "object" - and set the task accordingly.