Documentation
¶
Index ¶
- type JQ
- func (jq *JQ) Query(exp string) (any, error)
- func (jq *JQ) QueryToArray(exp string) ([]any, error)
- func (jq *JQ) QueryToBool(exp string) (bool, error)
- func (jq *JQ) QueryToFloat64(exp string) (float64, error)
- func (jq *JQ) QueryToInt64(exp string) (int64, error)
- func (jq *JQ) QueryToMap(exp string) (map[string]any, error)
- func (jq *JQ) QueryToString(exp string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JQ ¶
type JQ struct {
Data any
}
JQ (JSON Query) struct
func NewFileQuery ¶
NewFileQuery - Create a new &JQ from a JSON file.
func NewStringQuery ¶
NewStringQuery - Create a new &JQ from a raw JSON string.
func (*JQ) Query ¶
Query - queries against the JSON with the expression passed in. The exp is separated by dots (".")
func (*JQ) QueryToArray ¶
QueryToArray - Queries and converts the result to a slice of any ([]any)
func (*JQ) QueryToBool ¶
QueryToBool - Queries and converts the result to a boolean
func (*JQ) QueryToFloat64 ¶
QueryToFloat64 - Queries and converts the result to a float64
func (*JQ) QueryToInt64 ¶
QueryToInt64 - Queries and converts the result to an int64
func (*JQ) QueryToMap ¶
QueryToMap - Queries and converts the result to a map[string]any
Click to show internal directories.
Click to hide internal directories.