Skip to content

Little oddity with the built-in --jq flag #6654

Answered by mislav
LangLangBart asked this question in Q&A
Discussion options

You must be logged in to vote

Hi, good catch, but this is a difference between jq implementations due to language internals.

In Go, maps are always unordered and you cannot rely on some implicit order, or on the other in which keys appear in the original document. The only way to translate the result of a { name description } query into something ordered would be to have explicit ordering in your jq query.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by LangLangBart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants