Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Length() function #6

Open
runemadsen opened this issue Jun 26, 2015 · 0 comments
Open

Length() function #6

runemadsen opened this issue Jun 26, 2015 · 0 comments

Comments

@runemadsen
Copy link

It would be cool to have a shorthand way of getting the length of a JSON array. For example with this JSON:

{
  "data" : [1, 2, 3]
}

... I currently need to do this to check the length:

arr, _ := jq.Array("data")
fmt.Println( len(arr) )

It would be nice to be able to do this:

fmt.Println( jq.Length("data") )

A small thing, but very handy.

@runemadsen runemadsen changed the title Length() function Length() function Jun 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant