request stringlengths 13 923 | response dict |
|---|---|
Read the JSON Lines stream in `inputs/data.jsonl`; keep records whose `tags` contains "red"; then retain exactly these fields under their literal output keys (dotted paths stay dotted): `id`, `tags`; write compact JSONL. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -c -s '((. | map(select((((.tags | type) == \"array\" and (.tags | index(\"red\")) != null) or ((.tags | type) == \"string\" and (.tags | contains(\"red\"))))))) | map({\"id\": .id, \"tags\": .tags}))[]' inputs/data.jsonl"
} |
Read the JSON Lines stream in `inputs/data.jsonl`; keep records whose `tags` contains "blue"; then retain exactly these fields under their literal output keys (dotted paths stay dotted): `id`, `tags`; write compact JSONL. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -c -s '((. | map(select((((.tags | type) == \"array\" and (.tags | index(\"blue\")) != null) or ((.tags | type) == \"string\" and (.tags | contains(\"blue\"))))))) | map({\"id\": .id, \"tags\": .tags}))[]' inputs/data.jsonl"
} |
Read the JSON Lines stream in `inputs/data.jsonl`; keep records whose `score` lt 3; then sort by `name` asc, leaving null or missing values last; then retain exactly these fields under their literal output keys (dotted paths stay dotted): `id`, `name`, `score`; write compact JSONL. Keep nulls and empty strings distinct... | {
"kind": "COMMAND",
"value": "jq -c -s '(((. | map(select(((.score | type) == \"number\" and .score < 3)))) | ((map(select(.name != null)) | to_entries | sort_by([.value.name, .key]) | map(.value)) + map(select(.name == null)))) | map({\"id\": .id, \"name\": .name, \"score\": .score}))[]' inputs/data.jsonl"
} |
Read the JSON Lines stream in `inputs/data.jsonl`; keep records whose `score` lt 5; then sort by `name` asc, leaving null or missing values last; then retain exactly these fields under their literal output keys (dotted paths stay dotted): `id`, `name`, `score`; write compact JSONL. Keep nulls and empty strings distinct... | {
"kind": "COMMAND",
"value": "jq -c -s '(((. | map(select(((.score | type) == \"number\" and .score < 5)))) | ((map(select(.name != null)) | to_entries | sort_by([.value.name, .key]) | map(.value)) + map(select(.name == null)))) | map({\"id\": .id, \"name\": .name, \"score\": .score}))[]' inputs/data.jsonl"
} |
Read the JSON Lines stream in `inputs/data.jsonl`; keep records whose `score` lt 8; then sort by `name` asc, leaving null or missing values last; then retain exactly these fields under their literal output keys (dotted paths stay dotted): `id`, `name`, `score`; write compact JSONL. Keep nulls and empty strings distinct... | {
"kind": "COMMAND",
"value": "jq -c -s '(((. | map(select(((.score | type) == \"number\" and .score < 8)))) | ((map(select(.name != null)) | to_entries | sort_by([.value.name, .key]) | map(.value)) + map(select(.name == null)))) | map({\"id\": .id, \"name\": .name, \"score\": .score}))[]' inputs/data.jsonl"
} |
Read the JSON Lines stream in `inputs/data.jsonl`; keep records whose `score` lt 15; then sort by `name` asc, leaving null or missing values last; then retain exactly these fields under their literal output keys (dotted paths stay dotted): `id`, `name`, `score`; write compact JSONL. Keep nulls and empty strings distinc... | {
"kind": "COMMAND",
"value": "jq -c -s '(((. | map(select(((.score | type) == \"number\" and .score < 15)))) | ((map(select(.name != null)) | to_entries | sort_by([.value.name, .key]) | map(.value)) + map(select(.name == null)))) | map({\"id\": .id, \"name\": .name, \"score\": .score}))[]' inputs/data.jsonl"
} |
Read the JSON array in `inputs/data.json`; keep records whose `dept` neq "eng"; write compact JSONL. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -c '(. | map(select(.dept != \"eng\")))[]' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; keep records whose `dept` neq "sales"; write compact JSONL. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -c '(. | map(select(.dept != \"sales\")))[]' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; keep records whose `dept` neq "ops"; write compact JSONL. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -c '(. | map(select(.dept != \"ops\")))[]' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; keep records whose `dept` neq ""; write compact JSONL. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -c '(. | map(select(.dept != \"\")))[]' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; keep records whose `dept` neq null; write compact JSONL. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -c '(. | map(select(.dept != null)))[]' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; keep records whose `dept` neq "missing"; write compact JSONL. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -c '(. | map(select(.dept != \"missing\")))[]' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; keep records whose `dept` neq "finance"; write compact JSONL. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -c '(. | map(select(.dept != \"finance\")))[]' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; keep records whose `dept` neq "Eng"; write compact JSONL. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -c '(. | map(select(.dept != \"Eng\")))[]' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; keep records whose `score` lt 3; write compact JSONL. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -c '(. | map(select(((.score | type) == \"number\" and .score < 3))))[]' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; keep records whose `score` lt 5; write compact JSONL. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -c '(. | map(select(((.score | type) == \"number\" and .score < 5))))[]' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; keep records whose `score` lt 8; write compact JSONL. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -c '(. | map(select(((.score | type) == \"number\" and .score < 8))))[]' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; keep records whose `score` lt 15; write compact JSONL. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -c '(. | map(select(((.score | type) == \"number\" and .score < 15))))[]' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; keep records whose `score` lt -1; write compact JSONL. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -c '(. | map(select(((.score | type) == \"number\" and .score < -1))))[]' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; keep records whose `score` lt 0; write compact JSONL. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -c '(. | map(select(((.score | type) == \"number\" and .score < 0))))[]' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; keep records whose `score` lt 10; write compact JSONL. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -c '(. | map(select(((.score | type) == \"number\" and .score < 10))))[]' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; keep records whose `score` lt 20; write compact JSONL. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -c '(. | map(select(((.score | type) == \"number\" and .score < 20))))[]' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; keep records whose `score` lte 0; write compact JSONL. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -c '(. | map(select(((.score | type) == \"number\" and .score <= 0))))[]' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; keep records whose `score` lte 2; write compact JSONL. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -c '(. | map(select(((.score | type) == \"number\" and .score <= 2))))[]' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; keep records whose `score` lte 4; write compact JSONL. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -c '(. | map(select(((.score | type) == \"number\" and .score <= 4))))[]' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; keep records whose `score` lte 6; write compact JSONL. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -c '(. | map(select(((.score | type) == \"number\" and .score <= 6))))[]' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; keep records whose `score` lte 8; write compact JSONL. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -c '(. | map(select(((.score | type) == \"number\" and .score <= 8))))[]' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; keep records whose `score` lte 12; write compact JSONL. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -c '(. | map(select(((.score | type) == \"number\" and .score <= 12))))[]' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; keep records whose `score` lte 15; write compact JSONL. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -c '(. | map(select(((.score | type) == \"number\" and .score <= 15))))[]' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; keep records whose `score` lte 20; write compact JSONL. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -c '(. | map(select(((.score | type) == \"number\" and .score <= 20))))[]' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; keep records whose `profile.city` eq null; write compact JSONL. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -c '(. | map(select(.profile.city == null)))[]' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; keep records whose `profile.city` eq ""; write compact JSONL. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -c '(. | map(select(.profile.city == \"\")))[]' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; keep records whose `profile.city` eq "Paris"; write compact JSONL. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -c '(. | map(select(.profile.city == \"Paris\")))[]' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; keep records whose `profile.city` eq "Berlin"; write compact JSONL. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -c '(. | map(select(.profile.city == \"Berlin\")))[]' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; keep records whose `profile.city` eq "Oslo"; write compact JSONL. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -c '(. | map(select(.profile.city == \"Oslo\")))[]' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; keep records whose `profile.city` eq "London"; write compact JSONL. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -c '(. | map(select(.profile.city == \"London\")))[]' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; keep records whose `profile.city` eq "Quito"; write compact JSONL. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -c '(. | map(select(.profile.city == \"Quito\")))[]' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; keep records whose `profile.city` eq "missing"; write compact JSONL. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -c '(. | map(select(.profile.city == \"missing\")))[]' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; retain exactly these fields under their literal output keys (dotted paths stay dotted): `id`, `name`; write compact JSONL. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -c '(. | map({\"id\": .id, \"name\": .name}))[]' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; retain exactly these fields under their literal output keys (dotted paths stay dotted): `name`, `profile.city`, `note`; write compact JSONL. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -c '(. | map({\"name\": .name, \"profile.city\": .profile.city, \"note\": .note}))[]' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; sort by `id` asc, leaving null or missing values last; write compact JSONL. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -c '(. | ((map(select(.id != null)) | to_entries | sort_by([.value.id, .key]) | map(.value)) + map(select(.id == null))))[]' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; sort by `score` desc, leaving null or missing values last; write compact JSONL. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -c '(. | ((map(select(.score != null)) | sort_by(.score) | group_by(.score) | reverse | add) + map(select(.score == null))))[]' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; retain the first record for each distinct `dept` value; write compact JSONL. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -c '(. | reduce .[] as $row ([]; if any(.[]; .dept == ($row | .dept)) then . else . + [$row] end))[]' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; retain the first record for each distinct `profile.city` value; write compact JSONL. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -c '(. | reduce .[] as $row ([]; if any(.[]; .profile.city == ($row | .profile.city)) then . else . + [$row] end))[]' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; add `score_scaled` as numeric `score` multiplied by -1 (null when `score` is not numeric); write compact JSONL. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -c '(. | map(. + {\"score_scaled\": (if (.score|type)==\"number\" then (if -1 == 0 or .score == 0 then 0 else .score * -1 end) else null end)}))[]' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; add `score_scaled` as numeric `score` multiplied by 2 (null when `score` is not numeric); write compact JSONL. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -c '(. | map(. + {\"score_scaled\": (if (.score|type)==\"number\" then (if 2 == 0 or .score == 0 then 0 else .score * 2 end) else null end)}))[]' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; add `score_scaled` as numeric `score` multiplied by 3 (null when `score` is not numeric); write compact JSONL. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -c '(. | map(. + {\"score_scaled\": (if (.score|type)==\"number\" then (if 3 == 0 or .score == 0 then 0 else .score * 3 end) else null end)}))[]' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; add `score_scaled` as numeric `score` multiplied by 5 (null when `score` is not numeric); write compact JSONL. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -c '(. | map(. + {\"score_scaled\": (if (.score|type)==\"number\" then (if 5 == 0 or .score == 0 then 0 else .score * 5 end) else null end)}))[]' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; add `score_scaled` as numeric `score` multiplied by 10 (null when `score` is not numeric); write compact JSONL. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -c '(. | map(. + {\"score_scaled\": (if (.score|type)==\"number\" then (if 10 == 0 or .score == 0 then 0 else .score * 10 end) else null end)}))[]' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; add `score_scaled` as numeric `score` multiplied by 0 (null when `score` is not numeric); write compact JSONL. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -c '(. | map(. + {\"score_scaled\": (if (.score|type)==\"number\" then (if 0 == 0 or .score == 0 then 0 else .score * 0 end) else null end)}))[]' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; add `note_or_dash` using "-" when `note` is null or empty; write compact JSONL. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -c '(. | map(. + {\"note_or_dash\": (if .note == null or .note == \"\" then \"-\" else .note end)}))[]' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; add `note_or_dash` using "unknown" when `note` is null or empty; write compact JSONL. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -c '(. | map(. + {\"note_or_dash\": (if .note == null or .note == \"\" then \"unknown\" else .note end)}))[]' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; add `note_or_dash` using "NA" when `note` is null or empty; write compact JSONL. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -c '(. | map(. + {\"note_or_dash\": (if .note == null or .note == \"\" then \"NA\" else .note end)}))[]' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; add `note_or_dash` using "none" when `note` is null or empty; write compact JSONL. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -c '(. | map(. + {\"note_or_dash\": (if .note == null or .note == \"\" then \"none\" else .note end)}))[]' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; add `note_or_dash` using "(missing)" when `note` is null or empty; write compact JSONL. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -c '(. | map(. + {\"note_or_dash\": (if .note == null or .note == \"\" then \"(missing)\" else .note end)}))[]' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; keep records whose `dept` eq "eng"; print one `id` value per line. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -r '(. | map(select(.dept == \"eng\")))[] | .id' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; keep records whose `dept` eq "sales"; print one `id` value per line. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -r '(. | map(select(.dept == \"sales\")))[] | .id' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; keep records whose `dept` eq "ops"; print one `id` value per line. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -r '(. | map(select(.dept == \"ops\")))[] | .id' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; keep records whose `dept` eq ""; print one `id` value per line. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -r '(. | map(select(.dept == \"\")))[] | .id' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; keep records whose `dept` eq null; print one `id` value per line. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -r '(. | map(select(.dept == null)))[] | .id' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; keep records whose `dept` eq "missing"; print one `id` value per line. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -r '(. | map(select(.dept == \"missing\")))[] | .id' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; keep records whose `dept` eq "finance"; print one `id` value per line. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -r '(. | map(select(.dept == \"finance\")))[] | .id' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; keep records whose `dept` eq "Eng"; print one `id` value per line. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -r '(. | map(select(.dept == \"Eng\")))[] | .id' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; keep records whose `note` is neither null nor empty; print one `name` value per line. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -r '(. | map(select((.note != null and .note != \"\" and .note != [] and .note != {}))))[] | .name' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; sort by `score` asc, leaving null or missing values last; print one `id` value per line. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -r '(. | ((map(select(.score != null)) | to_entries | sort_by([.value.score, .key]) | map(.value)) + map(select(.score == null))))[] | .id' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; sort by `name` desc, leaving null or missing values last; print one `name` value per line. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -r '(. | ((map(select(.name != null)) | sort_by(.name) | group_by(.name) | reverse | add) + map(select(.name == null))))[] | .name' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; retain the first record for each distinct `dept` value; print one `dept` value per line. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -r '(. | reduce .[] as $row ([]; if any(.[]; .dept == ($row | .dept)) then . else . + [$row] end))[] | .dept' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; keep records whose `active` is the boolean true; then retain exactly these fields under their literal output keys (dotted paths stay dotted): `id`, `name`; write compact JSONL. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -c '((. | map(select(.active == true))) | map({\"id\": .id, \"name\": .name}))[]' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; keep records whose `tags` contains "ops"; then retain exactly these fields under their literal output keys (dotted paths stay dotted): `id`, `tags`; write compact JSONL. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -c '((. | map(select((((.tags | type) == \"array\" and (.tags | index(\"ops\")) != null) or ((.tags | type) == \"string\" and (.tags | contains(\"ops\"))))))) | map({\"id\": .id, \"tags\": .tags}))[]' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; keep records whose `tags` contains "red"; then retain exactly these fields under their literal output keys (dotted paths stay dotted): `id`, `tags`; write compact JSONL. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -c '((. | map(select((((.tags | type) == \"array\" and (.tags | index(\"red\")) != null) or ((.tags | type) == \"string\" and (.tags | contains(\"red\"))))))) | map({\"id\": .id, \"tags\": .tags}))[]' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; keep records whose `tags` contains "blue"; then retain exactly these fields under their literal output keys (dotted paths stay dotted): `id`, `tags`; write compact JSONL. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -c '((. | map(select((((.tags | type) == \"array\" and (.tags | index(\"blue\")) != null) or ((.tags | type) == \"string\" and (.tags | contains(\"blue\"))))))) | map({\"id\": .id, \"tags\": .tags}))[]' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; keep records whose `score` gte 0; then sort by `name` asc, leaving null or missing values last; write compact JSONL. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -c '((. | map(select(((.score | type) == \"number\" and .score >= 0)))) | ((map(select(.name != null)) | to_entries | sort_by([.value.name, .key]) | map(.value)) + map(select(.name == null))))[]' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; keep records whose `score` gte 5; then sort by `name` asc, leaving null or missing values last; write compact JSONL. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -c '((. | map(select(((.score | type) == \"number\" and .score >= 5)))) | ((map(select(.name != null)) | to_entries | sort_by([.value.name, .key]) | map(.value)) + map(select(.name == null))))[]' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; keep records whose `score` gte 8; then sort by `name` asc, leaving null or missing values last; write compact JSONL. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -c '((. | map(select(((.score | type) == \"number\" and .score >= 8)))) | ((map(select(.name != null)) | to_entries | sort_by([.value.name, .key]) | map(.value)) + map(select(.name == null))))[]' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; keep records whose `score` gte 12; then sort by `name` asc, leaving null or missing values last; write compact JSONL. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -c '((. | map(select(((.score | type) == \"number\" and .score >= 12)))) | ((map(select(.name != null)) | to_entries | sort_by([.value.name, .key]) | map(.value)) + map(select(.name == null))))[]' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; keep records whose `score` gte -1; then sort by `name` asc, leaving null or missing values last; write compact JSONL. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -c '((. | map(select(((.score | type) == \"number\" and .score >= -1)))) | ((map(select(.name != null)) | to_entries | sort_by([.value.name, .key]) | map(.value)) + map(select(.name == null))))[]' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; keep records whose `score` gte 3; then sort by `name` asc, leaving null or missing values last; write compact JSONL. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -c '((. | map(select(((.score | type) == \"number\" and .score >= 3)))) | ((map(select(.name != null)) | to_entries | sort_by([.value.name, .key]) | map(.value)) + map(select(.name == null))))[]' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; keep records whose `score` gte 10; then sort by `name` asc, leaving null or missing values last; write compact JSONL. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -c '((. | map(select(((.score | type) == \"number\" and .score >= 10)))) | ((map(select(.name != null)) | to_entries | sort_by([.value.name, .key]) | map(.value)) + map(select(.name == null))))[]' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; keep records whose `score` gte 20; then sort by `name` asc, leaving null or missing values last; write compact JSONL. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -c '((. | map(select(((.score | type) == \"number\" and .score >= 20)))) | ((map(select(.name != null)) | to_entries | sort_by([.value.name, .key]) | map(.value)) + map(select(.name == null))))[]' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; keep records whose `dept` neq "eng"; then count records whose `score` is present and non-null; write compact JSONL. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -c '((. | map(select(.dept != \"eng\"))) | map(select(.score != null)) | length)' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; keep records whose `dept` neq "sales"; then count records whose `score` is present and non-null; write compact JSONL. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -c '((. | map(select(.dept != \"sales\"))) | map(select(.score != null)) | length)' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; keep records whose `dept` neq "ops"; then count records whose `score` is present and non-null; write compact JSONL. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -c '((. | map(select(.dept != \"ops\"))) | map(select(.score != null)) | length)' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; keep records whose `dept` neq ""; then count records whose `score` is present and non-null; write compact JSONL. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -c '((. | map(select(.dept != \"\"))) | map(select(.score != null)) | length)' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; keep records whose `dept` neq null; then count records whose `score` is present and non-null; write compact JSONL. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -c '((. | map(select(.dept != null))) | map(select(.score != null)) | length)' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; keep records whose `dept` neq "missing"; then count records whose `score` is present and non-null; write compact JSONL. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -c '((. | map(select(.dept != \"missing\"))) | map(select(.score != null)) | length)' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; keep records whose `dept` neq "finance"; then count records whose `score` is present and non-null; write compact JSONL. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -c '((. | map(select(.dept != \"finance\"))) | map(select(.score != null)) | length)' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; keep records whose `dept` neq "Eng"; then count records whose `score` is present and non-null; write compact JSONL. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -c '((. | map(select(.dept != \"Eng\"))) | map(select(.score != null)) | length)' inputs/data.json"
} |
Read the JSON array in `inputs/data.json`; sort by `name` asc, leaving null or missing values last; then retain exactly these fields under their literal output keys (dotted paths stay dotted): `id`, `name`, `profile.city`; write compact JSONL. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -c '((. | ((map(select(.name != null)) | to_entries | sort_by([.value.name, .key]) | map(.value)) + map(select(.name == null)))) | map({\"id\": .id, \"name\": .name, \"profile.city\": .profile.city}))[]' inputs/data.json"
} |
Read the JSON Lines stream in `inputs/data.jsonl`; count records whose `score` is present and non-null; write compact JSONL. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -c -s '(. | map(select(.score != null)) | length)' inputs/data.jsonl"
} |
Read the JSON Lines stream in `inputs/data.jsonl`; return the sum of `score`; numeric values ignore nulls and booleans; write compact JSONL. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -c -s '(. | map(select((.score | type) == \"number\") | .score) | add // 0)' inputs/data.jsonl"
} |
Read the JSON Lines stream in `inputs/data.jsonl`; return the min of `score`; numeric values ignore nulls and booleans; write compact JSONL. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -c -s '(. | map(select((.score | type) == \"number\") | .score) as $n | if ($n|length)==0 then null else ($n|min) end)' inputs/data.jsonl"
} |
Read the JSON Lines stream in `inputs/data.jsonl`; return the max of `score`; numeric values ignore nulls and booleans; write compact JSONL. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -c -s '(. | map(select((.score | type) == \"number\") | .score) as $n | if ($n|length)==0 then null else ($n|max) end)' inputs/data.jsonl"
} |
Read the JSON Lines stream in `inputs/data.jsonl`; count records whose `profile.rank` is present and non-null; write compact JSONL. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -c -s '(. | map(select(.profile.rank != null)) | length)' inputs/data.jsonl"
} |
Read the JSON Lines stream in `inputs/data.jsonl`; return the sum of `profile.rank`; numeric values ignore nulls and booleans; write compact JSONL. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -c -s '(. | map(select((.profile.rank | type) == \"number\") | .profile.rank) | add // 0)' inputs/data.jsonl"
} |
Read the JSON Lines stream in `inputs/data.jsonl`; return the min of `profile.rank`; numeric values ignore nulls and booleans; write compact JSONL. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -c -s '(. | map(select((.profile.rank | type) == \"number\") | .profile.rank) as $n | if ($n|length)==0 then null else ($n|min) end)' inputs/data.jsonl"
} |
Read the JSON Lines stream in `inputs/data.jsonl`; return the max of `profile.rank`; numeric values ignore nulls and booleans; write compact JSONL. Keep nulls and empty strings distinct. | {
"kind": "COMMAND",
"value": "jq -c -s '(. | map(select((.profile.rank | type) == \"number\") | .profile.rank) as $n | if ($n|length)==0 then null else ($n|max) end)' inputs/data.jsonl"
} |
Attempt to remove the non-empty directory `output/nonempty` with rmdir; print exactly 'directory removal failed' and leave it unchanged when rmdir refuses. | {
"kind": "COMMAND",
"value": "if rmdir -- output/nonempty 2>/dev/null; then printf 'directory removal succeeded\\n'; else printf 'directory removal failed\\n'; fi"
} |
Attempt to remove the non-empty directory `result set/nonempty` with rmdir; print exactly 'directory removal failed' and leave it unchanged when rmdir refuses. | {
"kind": "COMMAND",
"value": "if rmdir -- 'result set/nonempty' 2>/dev/null; then printf 'directory removal succeeded\\n'; else printf 'directory removal failed\\n'; fi"
} |
Attempt to remove the non-empty directory `-output/nonempty` with rmdir; print exactly 'directory removal failed' and leave it unchanged when rmdir refuses. | {
"kind": "COMMAND",
"value": "if rmdir -- -output/nonempty 2>/dev/null; then printf 'directory removal succeeded\\n'; else printf 'directory removal failed\\n'; fi"
} |
Attempt to remove the non-empty directory `out'put/nonempty` with rmdir; print exactly 'directory removal failed' and leave it unchanged when rmdir refuses. | {
"kind": "COMMAND",
"value": "if rmdir -- 'out'\"'\"'put/nonempty' 2>/dev/null; then printf 'directory removal succeeded\\n'; else printf 'directory removal failed\\n'; fi"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.