Sherminator,
мысли вслух
obj1 = {}
obj1[11] = {};
obj1[11].id = 123;
obj1[11].lnkid = 111;
obj1[99] = {};
obj1[99].id = 321;
obj1[99].lnkid = 999;
obj2 = {};
obj2[111] = {};
obj2[111].id = 111;
obj2[111].type = 'permit';
obj2[999] = {};
obj2[999].id = 999;
obj2[999].type = 'deny';
function get_k(obj, str, type)
{ var i;
type && (i = type)
for(var k in obj) {
el = obj[k];
for(i in el) if (el[i] == str) return k ;
}
return false
}
var indx_obj2 = get_k(obj2, 'permit')
//var indx_obj2 = get_k(obj2, 'permit', 'type')
var id = obj2[indx_obj2].id;
var indx_obj1 = get_k(obj1, id)
alert(indx_obj1)
alert(JSON.stringify(obj1[indx_obj1]))