array

package
v1.0.2001 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2024 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Overview

Example
Get(arrData, "b.hhTy3.666.3")

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exists added in v1.0.1002

func Exists(source any, key string) bool

判断是否存在 if key in source return true or false

func Find added in v1.0.1002

func Find(source any, key string) any

查找 find key data from source

func Get added in v1.0.1002

func Get(source any, key string, defVal ...any) any

获取 get key data from source with default value

func Search(source any, path ...string) any

搜索 Search data with key from source

Types

type Array added in v1.0.2001

type Array struct {
	// contains filtered or unexported fields
}

*

  • 获取数组数据 / array struct *
  • @create 2022-5-3
  • @author deatil

func New

func New(source any) Array

构造函数 / New

func ParseJSON added in v1.0.2001

func ParseJSON(source []byte) (Array, error)

解析 JSON 数据 / parse json data

func (Array) Exists added in v1.0.2001

func (this Array) Exists(key string) bool

判断是否存在 if key in source return true or false

func (Array) Find added in v1.0.2001

func (this Array) Find(key string) any

查找 find key data from source

func (Array) Get added in v1.0.2001

func (this Array) Get(key string, defVal ...any) any

获取 get key data from source with default value

func (Array) Search added in v1.0.2001

func (this Array) Search(path ...string) any

搜索 Search data with key from source

func (Array) WithKeyDelim added in v1.0.2001

func (this Array) WithKeyDelim(data string) Array

设置 keyDelim with keyDelim

Jump to

Keyboard shortcuts

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