DotPath is similar to Path, but accepts string with dot format. ValuePath(b, "column", DotPath("a.b.c")) ValuePath(b, "column", DotPath("a.b[2].c")) Note that DotPath is ignored if the input is invalid.
(dotpath string)
| 424 | // |
| 425 | // Note that DotPath is ignored if the input is invalid. |
| 426 | func DotPath(dotpath string) Option { |
| 427 | path, _ := ParsePath(dotpath) |
| 428 | return func(p *PathOptions) { |
| 429 | p.Path = path |
| 430 | } |
| 431 | } |
| 432 | |
| 433 | // Unquote indicates that the result value should be unquoted. |
| 434 | // |
searching dependent graphs…