Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Assign ¶ added in v0.1.7
Assign writes a value into the provided JSON-like map using the same selector syntax supported by Select, but without the input/output prefix. Missing object segments are created automatically. Array writes are only supported when the indexed segment already exists.
func Select ¶
func Select(selector string, input, output interface{}) interface{}
Select resolves a value from either the input or output JSON-like roots (maps/slices produced by json.Unmarshal) based on a dot/bracket selector.
Supported prefixes:
- "output" (default when no prefix is provided)
- "input"
Supported path syntax:
- dot-separated keys: a.b.c
- array indices: a.0.b or a[0].b
When a path segment cannot be resolved the function returns nil.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.