Skip to content

Commit 1499f02

Browse files
authored
Update DataMapper.php
More nested as I thought
1 parent d50bedf commit 1499f02

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/DataMapper.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,10 @@ protected static function buildMap(array $data, array $mapping, $parent = null)
273273
// Check if $value is associative.
274274
if (\is_array(\current($value))) {
275275
foreach ($value as $k => $v) {
276+
if (isset($mapping['flat'][$pKey . '.' . $k])) {
277+
$pKey = $pKey . '.' . $k;
278+
}
279+
276280
$value[$k] = self::buildMap($v, $mapping, $pKey);
277281
}
278282
} else {

0 commit comments

Comments
 (0)