var convertSerConfigToMap = function()

in greengrass-opcua-adapter-nodejs/index.js [66:78]


var convertSerConfigToMap = function (arrObj) {

    return arrObj.reduce(function(result, current) {
        var subscriptions = current.subscriptions.reduce(function(map, obj) {
            map[obj.id] = obj.displayName;
            return map;
        }, {});
        result[current.server.name] = result[current.id_0] || {};
        result[current.server.name]["url"] = current.server.url;
        result[current.server.name]["subscription"] = subscriptions;
        return result;
    }, {});
};