Go to file
Rafleze 7e704441bf
Update README.md
2017-11-07 15:02:45 +01:00
DepthNSDictionary.xcodeproj first commit 2017-11-07 13:36:26 +01:00
Sources/DepthNSDictionary first commit 2017-11-07 13:36:26 +01:00
Tests first commit 2017-11-07 13:36:26 +01:00
.DS_Store first commit 2017-11-07 13:36:26 +01:00
LICENSE Initial commit 2017-11-07 13:24:13 +01:00
Package.swift first commit 2017-11-07 13:36:26 +01:00
README.md Update README.md 2017-11-07 15:02:45 +01:00

README.md

DepthNSDictionary

Extension to navigate a nested dictionary using separator to search nested keys in a recursive implementation

Usage

let nested_dict: NSDictionary = ["a": 1, "b": ["c": 2, "d": 3], "e": 5]

let param_a = nested_dict.dfs(forKey: "a") as! Int
let param_d = nested_dict.dfs(forKey: "b__d") as! Int
let isNil = nested_dict.dfs(forKey: "dog__cat") // it's nil