I would like to write a function which, given:

  * a `[]string` keys, and 
  * a `map[string]interface{}` m,

will return the value obtained by traversing `m` for each key in `keys`.

For example, if `m` looks like:

  {
    "foo": 123,
    "bar": map[string]interface{}{
      "one": 111,
      "two": "222222"
    },
  }

then I would like to be able to pass `["bar", "two"]` and receive 
`"222222"`. Similarly I would like to be able to pass ["foo"] and receive 
`123`.

Does this make sense? Is this doable?

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to