{"dependencies":[],"generated":{"js":"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar setPath = function (value, path, json) {\n    // We reached the end, return the value as a leaf\n    if (!path.length)\n        return value;\n    // Figure out if we are going down an array or object\n    var isArrayMatch = path[0].match(/^\\[(\\d+)\\]$/);\n    var name = isArrayMatch ? isArrayMatch[1] : path[0];\n    var nextPathIsArray = path[1] && path[1].match(/^\\[(\\d+)\\]$/);\n    var nextPathIndex = nextPathIsArray ? nextPathIsArray[1] : '';\n    // Add the value to our json recursively\n    json = json || (isArrayMatch ? [] : {});\n    if (nextPathIndex === '1' &&\n        (!Array.isArray(json[name]) || json[name].length <= 1)) {\n        json[name] = [json[name]];\n        json[name] = setPath(value, path.slice(1), json[name]);\n    }\n    else {\n        json[name] = setPath(value, path.slice(1), json[name]);\n    }\n    return json;\n};\nexports.default = function (key, treeArray) {\n    return treeArray.reduce(function (tree, node) { return setPath(node[key], node.path, tree); }, {});\n};\n//# sourceMappingURL=inflateTree.js.map"},"hash":"bf9e5c9995023f8c916bebde250d68e0"}