Jq: walk example doesn't work

Created on 3 Oct 2016  路  9Comments  路  Source: stedolan/jq

On this page
https://stedolan.github.io/jq/manual/
going to the walk(f) section.
Click on Run

returns in the playground

jq: error: walk/1 is not defined at , line 1:
walk(if type == "array" then sort else . end)
jq: 1 compile error
exit status 3

Most helpful comment

Please add "since version" information to new functions in the manual.

Edit: now I see, the whole document is versioned. Please link the latest release version on the website - I'd say most consumers are interested in this one.

All 9 comments

Currently the "playground" uses jq 1.5 but walk/1 was added after the release of jq 1.5.

walk/1 is just a jq-defined function, the definition of which can easily be found by googling for:

"def walk" jq

Please add "since version" information to new functions in the manual.

Edit: now I see, the whole document is versioned. Please link the latest release version on the website - I'd say most consumers are interested in this one.

Dupe of #963 which has the code ready to copy/paste.

+1 on "since version" annotations in manual.

@dedeibel @adamchainz The online manual links to the each version's manual. That's about as much as we're likely to do to record version differences, and it's probably enough anyways, since you can always refer to the appropriate jq version's manual.

Well, google led me to the docs. There I read about the feature. I was confused why it didn't work for me, tried this and that ... costed quite some time.

I didn't even now I had to look out of a version specific manual. The "since version" or something similar would have emphasized this.

Now I know about the different version manuals, sure, but nowadays I doubt the use case of visiting a website and looking at every detail of it. You just google things.

@nicowilliams I did search around the page, and understood the text under the header "For released versions, see jq 1.5, jq 1.4 or jq 1.3." as meaning "This documentation is for the released versions 1.5, 1.4, or 1.3". It's only when reading your message just now I understood the actual meaning. I think this could be rephrased a bit.

@adamchainz Suggestions?

Maybe we should change the heading to have "development" in bold and/or red?

@adamchainz Interesting. I almost didn't see it. Those tend to be "our site uses cookies banners", which I'm just completely blind to. If you'd not said the word "banner", I'd not have seen it. I suppose we could leave the title (with bolded, red "development") and _add_ a banner.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

neowulf picture neowulf  路  3Comments

geoffeg picture geoffeg  路  3Comments

tischwa picture tischwa  路  4Comments

ve3ied picture ve3ied  路  4Comments

lhunath picture lhunath  路  3Comments