jq

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsJQQuery added in v1.0.6

func IsJQQuery(query string) bool

IsJQQuery checks if a given string is a valid jq query. It attempts to compile the string as a jq expression and returns true if successful.

func ParseBool

func ParseBool(jqQuery string, obj interface{}) (bool, error)

ParseBool runs a jq query on a given object and returns the result as a bool.

func ParseFloat added in v1.0.6

func ParseFloat(jqQuery string, obj interface{}) (float64, error)

ParseFloat runs a jq query on a given object and returns the result as a float64.

func ParseMapInterface

func ParseMapInterface(jqQuery string, obj interface{}) (map[string]interface{}, error)

ParseMapInterface runs a jq query on a given object and returns the result as a map[string]interface{}.

func ParseMapStrings

func ParseMapStrings(keyToJQQueries map[string][]string, obj interface{}) (map[string][]string, error)

ParseMapStrings runs a jq query on a given object and returns the result as a map[string][]string.

func ParseString

func ParseString(jqQuery string, obj interface{}) (string, error)

ParseString runs a jq query on a given object and returns the result as a string.

Types

This section is empty.

Jump to

Keyboard shortcuts

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