try `$.each(plugin.apList.cachedPortals, function(key, value) {`