Merge pull request #6519 from spalger/implement/config/dotSeparatedKeysInArray
[cli/serve] expand dot-separated keys in yaml arrays
This commit is contained in:
commit
52766176ff
|
@ -48,7 +48,14 @@ module.exports = function (path) {
|
|||
_.forOwn(val, function (subVal, subKey) {
|
||||
apply(config, subVal, key + '.' + subKey);
|
||||
});
|
||||
} else {
|
||||
}
|
||||
else if (_.isArray(val)) {
|
||||
config[key] = [];
|
||||
val.forEach((subVal, i) => {
|
||||
apply(config, subVal, key + '.' + i);
|
||||
});
|
||||
}
|
||||
else {
|
||||
_.set(config, key, val);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue