You could do something as follows. Create an object for each row. And keep the references in and array byAdminId for admin-id, and an object byAppId for app-id, the add function does that in following. getByAppId and getByAdminId functions for retrieval of those objects.
var store = (function() {
var byAdminId = [];
var byAppId = {};
return {
add: function(appId, adminId, url, status) {
var d = {
appId: appId,
adminId: adminId,
url: url,
status: status
};
if (appId in byAppId) { // You could also use byAppId.hasOwnProperty(appId) here
byAppId[appId].push(d);
} else {
byAppId[appId] = [];
byAppId[appId].push(d);
}
byAdminId[adminId-1] = d;
},
getByAppId: function(appId) {
if (appId in byAppId) {
return byAppId[appId];
}
return null;
},
getByAdminId: function(adminId) {
return byAdminId[adminId-1];
}
};
})();
store.add(123, 1, "abc.com", 1);
store.add(123, 9, "xyz.com", 0);
store.add(539, 3, "exmaple.com", 1);
store.add(876, 4, "new.com", 1);
var objs = store.getByAppId(123);
for (var i = 0; i < objs.length; i++) {
// access admin id as follows
// objs[i].adminId
}
var obj = store.getByAdminId(1);
// access the url and status as follows
// obj.url
// obj.status