Skip to content

Commit ce83d48

Browse files
Merge pull request #642 from devxoul/custom-nested-key-delimeter-doc
Add custom nested key delimiter documentation
2 parents 34997b6 + 1680cee commit ce83d48

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,12 @@ func mapping(map: Map) {
290290
identifier <- map["app.identifier", nested: false]
291291
}
292292
```
293+
When you have nested keys which contain `.`, you can pass the custom nested key delimiter as follows ([#629](https://github.com/Hearst-DD/ObjectMapper/pull/629)):
294+
```swift
295+
func mapping(map: Map) {
296+
appName <- map["com.myapp.info->com.myapp.name", delimiter: "->"]
297+
}
298+
```
293299

294300
# Custom Transforms
295301
ObjectMapper also supports custom transforms that convert values during the mapping process. To use a transform, simply create a tuple with ```map["field_name"]``` and the transform of your choice on the right side of the ```<-``` operator:

0 commit comments

Comments
 (0)