function keyLookup(obj, string) { if (_.isObject(obj)) { var path = null; _.find(obj, function(value, key) { if (_.isString(key) && key.includes(string)) { path = key.toString(); return true; } else if (_.isObject(value) && !_.isFunction(value)) { var foundKeyValueRec = keyLookup(value, string); // Call recursively if (foundKeyValueRec) { path = key + ' : ' + foundKeyValueRec; return true; } } }); return path; } } // Test: var testObj = { someStuff: 1, someObjectStuff: { arr: [1, 2, 3] }, a: { b: { func : function() { return 1; }, c: [ { test : { f : 1 } }, 1 ] } } } keyLookup(testObj, "test") // returns "a : b : c : 0 : test"