Usage

Basic usage of DelimitedDict

Setup

from delimited import DelimitedDict

data = {
  "profile": {
    "name": "Chris",
  },
  "account": {
    "location": {
      "city": "Boston",
      "state": "MA"
    }
  }
}

user = DelimitedDict(data)

Access

user.get("account.location.city")
# returns "Boston"

Modify

user.set("profile.color", "blue")

Collapse

user.collapse("account")
# returns {"location.city": "Boston", "location.state": "MA"}