jsonpath

package
v0.214.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 21, 2024 License: AGPL-3.0, AGPL-3.0-or-later Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Transform

func Transform(j any, path string, tx func(any, any, any) any) error

Transform applies a transformation function to the value at the given path. The transformation function takes 3 parameters:

  1. the container object (will be either map[string]any or []any)
  2. the key within the container (will be either string or int depending on the container type)
  3. the value itself

The transformation function should return the new value to be set at the same path.

func Visit

func Visit(j any, path string, on func(any)) error

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL