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

Answer from user3899165 on Stack Overflow
🌐
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))'
Discussions

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
JQ and Multiple Fields with a SELECT - Stack Overflow
echo "$json_string" | jq '.checks | .[] | select(.status != "OK")' More on stackoverflow.com
🌐 stackoverflow.com
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
javascript - single select box filling in multiple fields (jQ maybe?) - Stack Overflow
I have a select box and I'd like to make it fill in fields (something like id ), would it be possible to fill in More on stackoverflow.com
🌐 stackoverflow.com
🌐
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.
🌐
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] ) ] | .[]'
🌐
Nhanvietluanvan
nhanvietluanvan.com › trang chủ › efficiently selecting multiple fields with jquery: a comprehensive guide
Efficiently Selecting Multiple Fields With Jquery: A Comprehensive Guide
July 7, 2023 - 4. Select multiple jQuery: If you’re working with HTML documents and using jQuery, you can use the .map() function to select multiple fields from HTML elements. For example, if you want to select the “href” and “text” fields from all ...
🌐
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.
🌐
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.
Find elsewhere
🌐
HatchJS
hatchjs.com › home › how to select multiple fields in jquery
How to Select Multiple Fields in jQuery
January 5, 2024 - Learn how to select multiple fields in jQuery with this easy-to-follow guide. Includes examples and code snippets. Boost your SEO rankings by ranking 1 on Google for 'jq select multiple fields'.
🌐
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 ...
🌐
Stack Overflow
stackoverflow.com › questions › 5236982 › single-select-box-filling-in-multiple-fields-jq-maybe
javascript - single select box filling in multiple fields (jQ maybe?) - Stack Overflow
$(function(){ $('select').change(function(){ // this is the selected option: var selected = $(this).children('option:selected')[0] //input box1: $('input.input1').val($(selected).attr('data-core')) //input box2 $('input.input2').val($(selected).attr('data-cco')) }) }) ... thanks, just out of curiosity what is all the $($( for? i haven't used jquery often, sorry if its dumb question.
🌐
HackingNote
hackingnote.com › en › cheatsheets › jq
Cheatsheet - jq
Multiple fields: # from top level $ cat file.json | jq '. | {field1, field2}' # from sub level $ cat file.json | jq '.results[] | {id, name}' Extract as text values instead of JSON (getting rid of quotes), use -r: $ cat file.json | jq -r '.a.b[0].c' Slice an array · $ echo '["a", "b", "c", "d"]' | jq '.[1:3]' # get "name" of id 1 $ cat file.json | jq '.results[] | select(.id == "1") | {name}' # get result with multiple filters $ cat file.json | jq '.results[] | select((.id == "1") and (.name="a"))' # filter with substrings $ cat file.json | jq '.results[] | select(.name | contains("ab"))' # filter with regex $ cat file.json | jq '.results[] | select(.name | test("Joe\s+Smith"))' Given a list (items[]), find the item according to .spec.foo, change the value of .spec.bar to baz: cat file.json | jq '(.items[] | select(.spec.foo == "key")).spec.bar |= "baz"' Selectors start with ..
🌐
Medium
kannappanchidambaram.medium.com › understanding-jq-a-guide-to-processing-and-filtering-json-data-2af8b5ec84cf
Understanding jq: A Guide to Processing and Filtering JSON Data | by Kannappan Chidambaram | Medium
December 3, 2023 - From this JSON if we need to fetch selected fields (i.e. id, first_name, avatar fields ) from the data array then The filter we need to use is array/object value iterator .[] along with specific fields like in the below - jq '.data[] | {id,first_name, avatar}' sample.json
🌐
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:
🌐
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