Skip to content

Commit

Permalink
Merge pull request #642 from devxoul/custom-nested-key-delimeter-doc
Browse files Browse the repository at this point in the history
Add custom nested key delimiter documentation
  • Loading branch information
tristanhimmelman authored Oct 24, 2016
2 parents 34997b6 + 1680cee commit ce83d48
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,12 @@ func mapping(map: Map) {
identifier <- map["app.identifier", nested: false]
}
```
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)):
```swift
func mapping(map: Map) {
appName <- map["com.myapp.info->com.myapp.name", delimiter: "->"]
}
```

# Custom Transforms
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:
Expand Down

0 comments on commit ce83d48

Please sign in to comment.