fosstodon.org is one of the many independent Mastodon servers you can use to participate in the fediverse.
Fosstodon is an invite only Mastodon instance that is open to those who are interested in technology; particularly free & open source software. If you wish to join, contact us for an invite.

Administered by:

Server stats:

10K
active users

Mattias Wadman

@qmacro Hi, i think you can do something like:
{dirs: {a: ["file1"]}}
| .dirs.a += ["file2"]
| .dirs.b += ["file3"]
The apush function is actually more or less what += etc translates to internally in most jq implementations :)

@qmacro Your welcome, like spread jq knowledge and i will surely look at your talk! if your curious github.com/stedolan/jq/blob/ma is what =, |= etc gets translated to, the two arguments are the LHS and RHS expressions of the operation

GitHubjq/builtin.jq at master · stedolan/jqCommand-line JSON processor. Contribute to stedolan/jq development by creating an account on GitHub.