diff --git a/index.js b/index.js index ca8904a..9549603 100644 --- a/index.js +++ b/index.js @@ -66,9 +66,7 @@ function unflatten (target, opts) { : parsedKey } - var sortedKeys = Object.keys(target).sort(function (keyA, keyB) { - return keyA.length - keyB.length - }) + var sortedKeys = Object.keys(target).sort(); sortedKeys.forEach(function (key) { var split = key.split(delimiter)