You can use jq '.[] | .login, .id' to obtain each login followed by its id.

Answer from user3899165 on Stack Overflow
๐ŸŒ
Gunnar Morling
morling.dev โ€บ blog โ€บ extracting-and-propagating-multiple-values-with-jq
Shell Spell: Extracting and Propagating Multiple Values With jq - Gunnar Morling
July 6, 2024 - jq is invaluable for handling JSON and I highly recommend spending some time with its reference documentation to learn about it. For the case at hand, the select() function is used within a pipeline for finding the right elements within the array of Terraform child modules and extracting the required values.
Discussions

JQ and Multiple Fields with a SELECT - Stack Overflow
echo "$json_string" | jq '.checks | .[] | select(.status != "OK")' More on stackoverflow.com
๐ŸŒ stackoverflow.com
How do I select multiple keys for output?
This seems like a basic question but I can't find examples anywhere in the documentation. If I have input like - alpha: 1 beta: foo gamma: 0.3 delta: bar - alpha: 2 beta: baz gamma: 1.23 delta: buz... More on github.com
๐ŸŒ github.com
15
2
December 10, 2023
json - Get field and nested field at the same time using jq - Unix & Linux Stack Exchange
> cat rm111.json | jq -r '.issues[] | .key' RM-111 > cat rm111.json | jq -r '.issues[] | .fields.summary' 6.6.0 More on unix.stackexchange.com
๐ŸŒ unix.stackexchange.com
September 30, 2020
json - JQ: Select multiple conditions - Stack Overflow
3 How to select a object in jq that matches on a greater or less than for multiple values in a attribute More on stackoverflow.com
๐ŸŒ stackoverflow.com
๐ŸŒ
Mark Needham
markhneedham.com โ€บ blog โ€บ 2021 โ€บ 05 โ€บ 19 โ€บ jq-select-multiple-keys
jq: Select multiple keys | Mark Needham
May 19, 2021 - And then to flatten it out into single arrays instead of nested ones, we can pipe the result through the .[] selector: cat swagger-clean.json | jq -r '.paths | keys[] as $k | [ (.[$k] | keys[] as $k1 | [$k, $k1, .[$k1].operationId, .[$k1].summary] ) ] | .[]'
๐ŸŒ
Stack Overflow
stackoverflow.com โ€บ questions โ€บ 79569370 โ€บ jq-and-multiple-fields-with-a-select
JQ and Multiple Fields with a SELECT - Stack Overflow
# jq 1.7+ jq '.checks[] |= select(.status != "OK")' <<< "$json_string" # jq 1.3+ jq '.checks |= map(select(.status != "OK"))' <<< "$json_string"
๐ŸŒ
Earthly
earthly.dev โ€บ blog โ€บ jq-select
JQ Select Explained: Selecting elements from JSON with Examples - Earthly Blog
July 24, 2023 - Itโ€™s similar to the WHERE clause in a SQL statement or array filter in JavaScript. Like map, I find select comes up quite a bit, so while you may have to come back to this article or google it the first few times you need it, with luck, it will start to stick to your memory after that. ... curl https://api.github.com/repos/stedolan/jq/issues?per_page=100 | \ jq 'map({ title: .title, number: .number, labels: .labels | length }) | map(select(.labels > 0))'
๐ŸŒ
CopyProgramming
copyprogramming.com โ€บ howto โ€บ jq-select-multiple-fields-from-array
Mastering jq: Selecting Multiple Fields from Arrays and 2026 Best Practices - Jq select multiple fields from array
November 21, 2025 - This practice prevents null pointer exceptions and data corruption in consuming applications. jq 1.8.1 is the latest stable version for 2026, offering security fixes and performance improvements over earlier releases ยท The pick() function provides the cleanest syntax for selecting multiple ...
Find elsewhere
๐ŸŒ
GitHub
gist.github.com โ€บ olih โ€บ f7437fb6962fb3ee9fe95bda8d2c8fa4
jq Cheet Sheet ยท GitHub
jq 'to_entries | map(select(.key | startswith("person."))) | from_entries' your.json ... Thank you, didn't know about the startwith. Its working now. ... Selecting multiple fields and output them in one line per element.
๐ŸŒ
Palmersteakhouse
palmersteakhouse.ca โ€บ educationai โ€บ jq-select-multiple-fields
jq select multiple fields
December 18, 2024 - The select function allows for more complex scenarios where you might only want to select certain fields based on a condition. Let's say you want to select only fields with string values: echo '{"name": "John Doe", "age": 30, "city": "New York", "isActive": true}' | jq 'select(type == "string")'
๐ŸŒ
DcodeSnippet
dcodesnippet.com โ€บ home โ€บ programming โ€บ mastering jq select multiple fields for efficient data manipulation
Mastering Jq Select Multiple Fields For Efficient Data Manipulation | DcodeSnippet
May 12, 2024 - With jq, you can simply specify the fields you want to extract and let the tool do the work for you. This not only saves you time but also reduces the likelihood of errors creeping in during manual data extraction processes. ... Simplified Query Writing Another major benefit of using jq to ...
๐ŸŒ
tutorialpedia
tutorialpedia.org โ€บ blog โ€บ how-do-i-select-multiple-fields-in-jq
How to Select Multiple Fields (Login and ID) in jq for NDJSON Files: A Step-by-Step Guide โ€” tutorialpedia.org
If some NDJSON entries lack id or login, jq will set the missing field to null (as seen in the 4th entry of our sample file). To omit entries with missing fields instead of setting null, use select() to filter objects that have both fields:
๐ŸŒ
QC 4Blog
qc4blog.com โ€บ home โ€บ using jq to select multiple fields from json data
JQ Select Multiple Fields: A Comprehensive Guide
March 22, 2024 - Learn how to efficiently select multiple fields from JSON data using JQ. Explore basic syntax, wildcards, filtering techniques, and advanced strategies.
๐ŸŒ
Lekkimworld
lekkimworld.com โ€บ 2018 โ€บ 09 โ€บ 07 โ€บ jq-and-multi-field-output-to-csv
jq and multi-field output to CSV โ€“ lekkimworld.com
September 7, 2018 - $ sfdx force:schema:sobject:describe -s Account -u myorg --json | jq -r ".result.fields[] | .label, .name" Age Age__pc PO Box PO_Box__pc Postal Code Before City Postal_Code_Before_City__pc Street No Before Street Street_No_Before_Street__pc Archived State Archived_State__pc
๐ŸŒ
jq
jqlang.org โ€บ manual
jq 1.8 Manual
A jq program is a "filter": it takes an input, and produces an output. There are a lot of builtin filters for extracting a particular field of an object, or converting a number to a string, or various other standard tasks. Filters can be combined in various ways - you can pipe the output of one filter into another filter, or collect the output of a filter into an array. Some filters produce multiple results, for instance there's one that produces all the elements of its input array.