EachKeyWildcard resolves a path that may contain [*] components. A wildcard requires an array at that position and fans out over its elements before resolving the rest of the path. Multiple wildcards produce one callback for every matching combination, in document order. idx is the zero-based order
(data []byte, cb func(idx int, value []byte, vt ValueType, err error), path ...string)
| 13 | // |
| 14 | // SYS-REQ-113 |
| 15 | func EachKeyWildcard(data []byte, cb func(idx int, value []byte, vt ValueType, err error), path ...string) error { |
| 16 | nextMatch := 0 |
| 17 | return eachKeyWildcard(data, cb, &nextMatch, path) |
| 18 | } |
| 19 | |
| 20 | // SYS-REQ-113 |
| 21 | func eachKeyWildcard(data []byte, cb func(idx int, value []byte, vt ValueType, err error), nextMatch *int, path []string) error { |