diff --git a/Sources/Unboxer.swift b/Sources/Unboxer.swift index 9e920f1..9217959 100644 --- a/Sources/Unboxer.swift +++ b/Sources/Unboxer.swift @@ -224,24 +224,24 @@ private extension Unboxer { case .keyPath(let keyPath): var node: UnboxPathNode = self.dictionary let components = keyPath.components(separatedBy: ".") - let lastKey = components.last - - for key in components { - guard let nextValue = node.unboxPathValue(forKey: key) else { - throw UnboxPathError.missingKey(key) + let endPath = components.count - 1 + + for i in 0..