Datasets:
File size: 64,143 Bytes
4b9cad5 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | {"id":"so-18972180","request":"Given a JSON object, output a new object where each top-level key (except 'data') maps to an array of its immediate child keys.","command":"jq '[(keys - [\"data\"])[] as $key | { ($key): .[$key] | keys }] | add'","input_text":"{\"acquisition_parameters\": {\"laser\": {\"wavelength\": {\"value\": 632}}, \"date\": \"02/03/2525\", \"camera\": {}}, \"software\": {\"repo\": \"github.com/user/repo\", \"commit\": \"a7642f\", \"branch\": \"develop\"}, \"data\": [{},{},{}]}","expected_output":"{\n \"acquisition_parameters\": [\n \"camera\",\n \"date\",\n \"laser\"\n ],\n \"software\": [\n \"branch\",\n \"commit\",\n \"repo\"\n ]\n}\n","validation_input":"{\"config\": {\"host\": \"localhost\", \"port\": 8080}, \"metadata\": {\"version\": \"1.0\", \"author\": \"admin\"}, \"data\": []}","validation_output":"{\n \"config\": [\n \"host\",\n \"port\"\n ],\n \"metadata\": [\n \"author\",\n \"version\"\n ]\n}\n","family":"real-stackoverflow","difficulty":3,"split":"test","source":"stackoverflow-accepted-answer","license":"CC-BY-SA-4.0","question_url":"https://stackoverflow.com/questions/18972180/using-jq-to-list-keys-in-a-json-object","question_title":"Using jq to list keys in a JSON object","question_owner":"Ryan","answer_owner":"mwag","answer_id":28445937,"question_score":17,"reviewed":true}
{"id":"so-24528256","request":"Transform an array of strings into an array of objects where each object has a \"name\" field containing the string and an \"index\" field containing its original zero-based index.","command":"jq 'to_entries | map({name:.value, index:.key})'","input_text":"[\"a\", \"b\"]","expected_output":"[\n {\n \"name\": \"a\",\n \"index\": 0\n },\n {\n \"name\": \"b\",\n \"index\": 1\n }\n]\n","validation_input":"[\"apple\", \"banana\", \"cherry\"]","validation_output":"[\n {\n \"name\": \"apple\",\n \"index\": 0\n },\n {\n \"name\": \"banana\",\n \"index\": 1\n },\n {\n \"name\": \"cherry\",\n \"index\": 2\n }\n]\n","family":"real-stackoverflow","difficulty":3,"split":"test","source":"stackoverflow-accepted-answer","license":"CC-BY-SA-4.0","question_url":"https://stackoverflow.com/questions/24528256/how-do-i-add-an-index-in-jq","question_title":"How do i add an index in jq","question_owner":"Eric Hartford","answer_owner":"Jeff Mercado","answer_id":24568571,"question_score":17,"reviewed":true}
{"id":"so-25001349","request":"From an object containing a 'Tags' array of key-value pairs, extract the 'Value' corresponding to the entry where 'Key' is 'Type'.","command":"jq -r '.Tags[] | select(.Key == \"Type\") | .Value'","input_text":"{\"Tags\": [{\"Key\": \"Name\", \"Value\": \"foo\"}, {\"Key\": \"Type\", \"Value\": \"C\"}]}\n{\"Tags\": [{\"Key\": \"Env\", \"Value\": \"prod\"}, {\"Key\": \"Type\", \"Value\": \"B\"}]}","expected_output":"C\nB\n","validation_input":"{\"Tags\": [{\"Key\": \"Type\", \"Value\": \"X\"}, {\"Key\": \"Name\", \"Value\": \"bar\"}]}\n{\"Tags\": [{\"Key\": \"Name\", \"Value\": \"baz\"}, {\"Key\": \"Type\", \"Value\": \"Y\"}]}","validation_output":"X\nY\n","family":"real-stackoverflow","difficulty":3,"split":"test","source":"stackoverflow-accepted-answer","license":"CC-BY-SA-4.0","question_url":"https://stackoverflow.com/questions/25001349/conditionally-print-value-based-on-the-value-of-another-key","question_title":"Conditionally print value based on the value of another key","question_owner":"stuckintheshuck","answer_owner":"PeterM","answer_id":25001531,"question_score":10,"reviewed":true}
{"id":"so-25780807","request":"Recursively search for the value of the key 'element' within any object nested under the key 'level3', which itself is nested under 'level1'. Return all found values.","command":"jq '.level1 | .. | objects | select(has(\"level3\")) | .level3.element'","input_text":"{\"level1\": {\"a\": {\"level3\": {\"element\": \"val1\"}}, \"b\": {\"level3\": {\"element\": \"val2\"}, \"other\": {\"level3\": {\"element\": \"val3\"}}}}}","expected_output":"\"val1\"\n\"val2\"\n\"val3\"\n","validation_input":"{\"level1\": {\"x\": {\"level3\": {\"element\": \"foo\"}}, \"y\": {\"z\": {\"level3\": {\"element\": \"bar\"}}}}}","validation_output":"\"foo\"\n\"bar\"\n","family":"real-stackoverflow","difficulty":3,"split":"test","source":"stackoverflow-accepted-answer","license":"CC-BY-SA-4.0","question_url":"https://stackoverflow.com/questions/25780807/how-can-i-use-a-relative-path-or-a-wildcard-in-jq","question_title":"How can I use a relative Path or a Wildcard in JQ","question_owner":"Mirko Ebert","answer_owner":"Jeff Mercado","answer_id":25781241,"question_score":10,"reviewed":true}
{"id":"so-29396154","request":"Compute the set difference of the 'all' array minus the 'some' array.","command":"jq '.all - .some'","input_text":"{\"all\":[\"A\",\"B\",\"C\",\"ABC\"],\"some\":[\"B\",\"C\"]}","expected_output":"[\n \"A\",\n \"ABC\"\n]\n","validation_input":"{\"all\":[1,2,3,4],\"some\":[2,4]}","validation_output":"[\n 1,\n 3\n]\n","family":"real-stackoverflow","difficulty":3,"split":"test","source":"stackoverflow-accepted-answer","license":"CC-BY-SA-4.0","question_url":"https://stackoverflow.com/questions/29396154/jq-setdiff-of-two-arrays","question_title":"JQ: setdiff of two arrays","question_owner":"Jon","answer_owner":"Jon","answer_id":29417648,"question_score":13,"reviewed":true}
{"id":"so-31035704","request":"Read a JSON Lines stream of objects with 'machine' and 'domain' fields. Group by machine, then for each machine calculate the total count of records and a breakdown of counts per unique domain. Output an array of objects containing 'machine', 'total', and 'domains' (an object mapping domain names to their counts).","command":"jq -s 'group_by(.machine) | map({\"machine\": .[0].machine, \"total\": length, \"domains\": (group_by(.domain) | map({\"key\": .[0].domain, \"value\": length}) | from_entries)})'","input_text":"{\"machine\": \"possible_victim01\", \"domain\": \"evil.com\", \"timestamp\":1435071870}\n{\"machine\": \"possible_victim01\", \"domain\": \"evil.com\", \"timestamp\":1435071875}\n{\"machine\": \"possible_victim01\", \"domain\": \"soevil.com\", \"timestamp\":1435071877}\n{\"machine\": \"possible_victim02\", \"domain\": \"bad.com\", \"timestamp\":1435071877}\n{\"machine\": \"possible_victim03\", \"domain\": \"soevil.com\", \"timestamp\":1435071879}","expected_output":"[\n {\n \"machine\": \"possible_victim01\",\n \"total\": 3,\n \"domains\": {\n \"evil.com\": 2,\n \"soevil.com\": 1\n }\n },\n {\n \"machine\": \"possible_victim02\",\n \"total\": 1,\n \"domains\": {\n \"bad.com\": 1\n }\n },\n {\n \"machine\": \"possible_victim03\",\n \"total\": 1,\n \"domains\": {\n \"soevil.com\": 1\n }\n }\n]\n","validation_input":"{\"machine\": \"hostA\", \"domain\": \"x.com\", \"timestamp\":100}\n{\"machine\": \"hostA\", \"domain\": \"y.com\", \"timestamp\":101}\n{\"machine\": \"hostB\", \"domain\": \"x.com\", \"timestamp\":102}","validation_output":"[\n {\n \"machine\": \"hostA\",\n \"total\": 2,\n \"domains\": {\n \"x.com\": 1,\n \"y.com\": 1\n }\n },\n {\n \"machine\": \"hostB\",\n \"total\": 1,\n \"domains\": {\n \"x.com\": 1\n }\n }\n]\n","family":"real-stackoverflow","difficulty":3,"split":"test","source":"stackoverflow-accepted-answer","license":"CC-BY-SA-4.0","question_url":"https://stackoverflow.com/questions/31035704/use-jq-to-count-on-multiple-levels","question_title":"Use jq to count on multiple levels","question_owner":"JustChill","answer_owner":"Jimmy","answer_id":31036137,"question_score":12,"reviewed":true}
{"id":"so-31694182","request":"Add a new key-value pair \"freshly\": \"added\" to the nested object named \"nested\" in the input JSON, preserving all other existing keys.","command":"jq '.nested.freshly = \"added\"'","input_text":"{\n \"some\": \"property\",\n \"nested\": {\n \"hello\": \"world\"\n }\n}","expected_output":"{\n \"some\": \"property\",\n \"nested\": {\n \"hello\": \"world\",\n \"freshly\": \"added\"\n }\n}\n","validation_input":"{\n \"id\": 1,\n \"data\": {\n \"x\": 10\n },\n \"nested\": {\n \"a\": 1,\n \"b\": 2\n }\n}","validation_output":"{\n \"id\": 1,\n \"data\": {\n \"x\": 10\n },\n \"nested\": {\n \"a\": 1,\n \"b\": 2,\n \"freshly\": \"added\"\n }\n}\n","family":"real-stackoverflow","difficulty":3,"split":"test","source":"stackoverflow-accepted-answer","license":"CC-BY-SA-4.0","question_url":"https://stackoverflow.com/questions/31694182/how-to-modify-a-nested-object-with-jq","question_title":"How to modify a nested object with jq","question_owner":"ValLeNain","answer_owner":"Jeff Mercado","answer_id":31694658,"question_score":17,"reviewed":true}
{"id":"so-34165201","request":"Find all paths in the JSON structure where the value is exactly the string 'foo'. Return these paths as an array of arrays representing the indices/keys.","command":"jq '[paths as $path | select(getpath($path) == \"foo\") | $path]'","input_text":"{\"json\": [\"a\", [\"b\", \"c\", [\"d\", \"foo\", 1], [[42, \"foo\"]]]]}","expected_output":"[\n [\n \"json\",\n 1,\n 2,\n 1\n ],\n [\n \"json\",\n 1,\n 3,\n 0,\n 1\n ]\n]\n","validation_input":"{\"data\": {\"nested\": [\"foo\", {\"inner\": \"foo\"}]}}","validation_output":"[\n [\n \"data\",\n \"nested\",\n 0\n ],\n [\n \"data\",\n \"nested\",\n 1,\n \"inner\"\n ]\n]\n","family":"real-stackoverflow","difficulty":3,"split":"test","source":"stackoverflow-accepted-answer","license":"CC-BY-SA-4.0","question_url":"https://stackoverflow.com/questions/34165201/how-to-get-the-index-path-of-found-values-using-jq","question_title":"How to get the index path of found values using jq?","question_owner":"Ortwin Gentz","answer_owner":"user3899165","answer_id":34166237,"question_score":10,"reviewed":true}
{"id":"so-37328327","request":"Extract the substring after 'task/' from the input string using a regular expression match.","command":"jq 'match(\"(.*task?)\\\\/(.*$)\").captures[1].string'","input_text":"\"arn:aws:ecs:eu-west-1:foo:task/blablabla\"","expected_output":"\"blablabla\"\n","validation_input":"\"arn:aws:s3:::bucket/task/my-task-id-123\"","validation_output":"\"my-task-id-123\"\n","family":"real-stackoverflow","difficulty":3,"split":"test","source":"stackoverflow-accepted-answer","license":"CC-BY-SA-4.0","question_url":"https://stackoverflow.com/questions/37328327/apply-regex-on-jq","question_title":"Apply regex on JQ","question_owner":"paul","answer_owner":"user3899165","answer_id":37329187,"question_score":18,"reviewed":true}
{"id":"so-37864617","request":"Transform the input JSON by iterating over the 'things' array. For each item, create an object containing the 'name' and a 'category' field. The 'category' value should be extracted from the 'params' array where the 'key' is 'category'.","command":"jq '.things | .[] | {name: .name, category: .params | .[] | select(.key==\"category\") | .value }'","input_text":"{\"things\":[{\"name\":\"foo\",\"params\":[{\"type\":\"t1\",\"key\":\"key1\",\"value\":\"val1\"},{\"type\":\"t1\",\"key\":\"category\",\"value\":\"thefoocategory\"}]},{\"name\":\"bar\",\"params\":[{\"type\":\"t1\",\"key\":\"key1\",\"value\":\"val1\"},{\"type\":\"t1\",\"key\":\"category\",\"value\":\"thebarcategory\"}]}]}","expected_output":"{\n \"name\": \"foo\",\n \"category\": \"thefoocategory\"\n}\n{\n \"name\": \"bar\",\n \"category\": \"thebarcategory\"\n}\n","validation_input":"{\"things\":[{\"name\":\"alpha\",\"params\":[{\"type\":\"t2\",\"key\":\"id\",\"value\":\"101\"},{\"type\":\"t2\",\"key\":\"category\",\"value\":\"catA\"}]},{\"name\":\"beta\",\"params\":[{\"type\":\"t2\",\"key\":\"id\",\"value\":\"102\"},{\"type\":\"t2\",\"key\":\"category\",\"value\":\"catB\"}]}]}","validation_output":"{\n \"name\": \"alpha\",\n \"category\": \"catA\"\n}\n{\n \"name\": \"beta\",\n \"category\": \"catB\"\n}\n","family":"real-stackoverflow","difficulty":3,"split":"test","source":"stackoverflow-accepted-answer","license":"CC-BY-SA-4.0","question_url":"https://stackoverflow.com/questions/37864617/how-to-use-jq-to-create-an-object-with-an-arbitrary-key-from-a-sub-array","question_title":"How to use jq to create an object with an arbitrary key from a sub array?","question_owner":"geoff","answer_owner":"geoff","answer_id":37865896,"question_score":18,"reviewed":true}
{"id":"so-38364458","request":"Read a single JSON array from stdin. Compute the intersection of this array with the hardcoded array [2, 4, 6, 8, 10]. The result should be an array of elements present in both arrays, preserving the order of the input array but removing duplicates if necessary to match set intersection logic (unique common elements).","command":"jq 'reduce .[] as $x ([]; if ($x | IN([2, 4, 6, 8, 10][])) and (. | index($x) == null) then . + [$x] else . end)'","input_text":"[1, 2, 3, 4]","expected_output":"[\n 2,\n 4\n]\n","validation_input":"[5, 6, 7, 8, 9, 10]","validation_output":"[\n 6,\n 8,\n 10\n]\n","family":"real-stackoverflow","difficulty":3,"split":"test","source":"stackoverflow-accepted-answer","license":"CC-BY-SA-4.0","question_url":"https://stackoverflow.com/questions/38364458/how-to-get-the-intersection-of-two-json-arrays-using-jq","question_title":"how to get the intersection of two JSON arrays using jq","question_owner":"mwag","answer_owner":"peak","answer_id":38365155,"question_score":12,"reviewed":true}
{"id":"so-38779732","request":"Extract the key-value pairs from the 'apps' object as tab-separated strings.","command":"jq -r '.apps | to_entries[] | \"\\(.key)\\t\\(.value)\"'","input_text":"{\"apps\": {\"firefox\": \"1.0.0\", \"ie\": \"1.0.1\", \"chrome\": \"2.0.0\"}}","expected_output":"firefox\t1.0.0\nie\t1.0.1\nchrome\t2.0.0\n","validation_input":"{\"apps\": {\"app1\": \"v1\", \"app2\": \"v2\"}}","validation_output":"app1\tv1\napp2\tv2\n","family":"real-stackoverflow","difficulty":3,"split":"test","source":"stackoverflow-accepted-answer","license":"CC-BY-SA-4.0","question_url":"https://stackoverflow.com/questions/38779732/running-bash-commands-for-each-json-item-through-jq","question_title":"Running bash commands for each JSON item through jq","question_owner":"solemnify","answer_owner":"Jeff Mercado","answer_id":38779788,"question_score":14,"reviewed":true}
{"id":"so-39204158","request":"For each object in the Volumes array, extract the VolumeId and the Value of the first Tag, separated by a space.","command":"jq -r '.Volumes[] | .VolumeId + \" \" + .Tags[0].Value'","input_text":"{\n \"Volumes\": [\n {\n \"AvailabilityZone\": \"us-east-1a\",\n \"Tags\": [\n {\n \"Value\": \"vol-rescue-system\",\n \"Key\": \"Name\"\n }\n ],\n \"VolumeId\": \"vol-00112233\"\n },\n {\n \"AvailabilityZone\": \"us-east-1a\",\n \"Tags\": [\n {\n \"Value\": \"vol-rescue-swap\",\n \"Key\": \"Name\"\n }\n ],\n \"VolumeId\": \"vol-00112234\"\n },\n {\n \"AvailabilityZone\": \"us-east-1a\",\n \"Tags\": [\n {\n \"Value\": \"vol-rescue-storage\",\n \"Key\": \"Name\"\n }\n ],\n \"VolumeId\": \"vol-00112235\"\n }\n ]\n}","expected_output":"vol-00112233 vol-rescue-system\nvol-00112234 vol-rescue-swap\nvol-00112235 vol-rescue-storage\n","validation_input":"{\n \"Volumes\": [\n {\n \"AvailabilityZone\": \"eu-west-1b\",\n \"Tags\": [\n {\n \"Value\": \"data-vol-1\",\n \"Key\": \"Name\"\n }\n ],\n \"VolumeId\": \"vol-abc123\"\n },\n {\n \"AvailabilityZone\": \"eu-west-1b\",\n \"Tags\": [\n {\n \"Value\": \"data-vol-2\",\n \"Key\": \"Name\"\n }\n ],\n \"VolumeId\": \"vol-def456\"\n }\n ]\n}","validation_output":"vol-abc123 data-vol-1\nvol-def456 data-vol-2\n","family":"real-stackoverflow","difficulty":3,"split":"test","source":"stackoverflow-accepted-answer","license":"CC-BY-SA-4.0","question_url":"https://stackoverflow.com/questions/39204158/loop-through-json-using-jq-to-get-multiple-value","question_title":"Loop through json using jq to get multiple value","question_owner":"sylye","answer_owner":"Andreas Louv","answer_id":39204803,"question_score":14,"reviewed":true}
{"id":"so-39232060","request":"Extract the row objects from the first result's data array in the JSON input, outputting each row object on a separate line as compact JSON.","command":"jq -c '.results[0].data[].row[]'","input_text":"{\"results\":[{\"columns\":[\"n\"],\"data\":[{\"row\":[{\"key1\":\"row1\",\"key2\":\"row1\"}],\"meta\":[{\"key\":\"value\"}]},{\"row\":[{\"key1\":\"row2\",\"key2\":\"row2\"}],\"meta\":[{\"key\":\"value\"}]}]}],\"errors\":[]}","expected_output":"{\"key1\":\"row1\",\"key2\":\"row1\"}\n{\"key1\":\"row2\",\"key2\":\"row2\"}\n","validation_input":"{\"results\":[{\"columns\":[\"id\",\"name\"],\"data\":[{\"row\":[{\"id\":1,\"name\":\"Alice\"}],\"meta\":[]},{\"row\":[{\"id\":2,\"name\":\"Bob\"}],\"meta\":[]}]}],\"errors\":[]}","validation_output":"{\"id\":1,\"name\":\"Alice\"}\n{\"id\":2,\"name\":\"Bob\"}\n","family":"real-stackoverflow","difficulty":3,"split":"test","source":"stackoverflow-accepted-answer","license":"CC-BY-SA-4.0","question_url":"https://stackoverflow.com/questions/39232060/process-large-json-stream-with-jq","question_title":"Process large JSON stream with jq","question_owner":"Martin Preusse","answer_owner":"peak","answer_id":39234104,"question_score":13,"reviewed":true}
{"id":"so-39971324","request":"Select all objects from the 'Subnets' array that contain a tag with Key 'Name' and Value 'TheName'.","command":"jq '.Subnets[] | select(any(.Tags[]; .Key == \"Name\" and .Value == \"TheName\"))'","input_text":"{\"Subnets\": [{\"VpcId\": \"vpc-1\", \"SubnetId\": \"subnet-1\", \"Tags\": [{\"Key\": \"Ignore\", \"Value\": \"TheName\"}, {\"Key\": \"Name\", \"Value\": \"Other\"}]}, {\"VpcId\": \"vpc-2\", \"SubnetId\": \"subnet-2\", \"Tags\": [{\"Key\": \"Ignore\", \"Value\": \"ignore\"}, {\"Key\": \"Name\", \"Value\": \"TheName\"}]}]}","expected_output":"{\n \"VpcId\": \"vpc-2\",\n \"SubnetId\": \"subnet-2\",\n \"Tags\": [\n {\n \"Key\": \"Ignore\",\n \"Value\": \"ignore\"\n },\n {\n \"Key\": \"Name\",\n \"Value\": \"TheName\"\n }\n ]\n}\n","validation_input":"{\"Subnets\": [{\"VpcId\": \"vpc-A\", \"SubnetId\": \"subnet-A\", \"Tags\": [{\"Key\": \"Name\", \"Value\": \"TheName\"}]}, {\"VpcId\": \"vpc-B\", \"SubnetId\": \"subnet-B\", \"Tags\": [{\"Key\": \"Name\", \"Value\": \"Wrong\"}]}]}","validation_output":"{\n \"VpcId\": \"vpc-A\",\n \"SubnetId\": \"subnet-A\",\n \"Tags\": [\n {\n \"Key\": \"Name\",\n \"Value\": \"TheName\"\n }\n ]\n}\n","family":"real-stackoverflow","difficulty":3,"split":"test","source":"stackoverflow-accepted-answer","license":"CC-BY-SA-4.0","question_url":"https://stackoverflow.com/questions/39971324/using-jq-to-select-a-parent-by-searching-child-key-value-pair","question_title":"Using jq to select a parent by searching child key/value pair","question_owner":"Tim Smith","answer_owner":"peak","answer_id":39971841,"question_score":13,"reviewed":true}
{"id":"so-41045659","request":"Given a JSON object with two arrays, one at 'time.startPeriodName' and one at 'data.weather', merge them into a single object where the period names are keys and the weather descriptions are values.","command":"jq '[.time.startPeriodName, .data.weather] | transpose | map({(.[0]): .[1]}) | add'","input_text":"{\"time\":{\"startPeriodName\":[\"Today\",\"Tonight\"]},\"data\":{\"weather\":[\"Mostly Sunny\",\"Mostly Cloudy\"]}}","expected_output":"{\n \"Today\": \"Mostly Sunny\",\n \"Tonight\": \"Mostly Cloudy\"\n}\n","validation_input":"{\"time\":{\"startPeriodName\":[\"Monday\",\"Tuesday\"]},\"data\":{\"weather\":[\"Rain\",\"Sun\"]}}","validation_output":"{\n \"Monday\": \"Rain\",\n \"Tuesday\": \"Sun\"\n}\n","family":"real-stackoverflow","difficulty":3,"split":"test","source":"stackoverflow-accepted-answer","license":"CC-BY-SA-4.0","question_url":"https://stackoverflow.com/questions/41045659/merge-two-arrays-into-a-single-object-with-jq","question_title":"Merge two arrays into a single object with jq","question_owner":"Scott","answer_owner":"peak","answer_id":41046715,"question_score":15,"reviewed":true}
{"id":"so-42299905","request":"Flatten an arbitrary JSON object into a single-level object where keys are the dot-separated paths to leaf values and values are the corresponding leaf values. Use '.' as the delimiter.","command":"jq 'reduce (tostream | select(length == 2)) as $i ({}; .[[$i[0][] | tostring] | join(\".\")] = $i[1])'","input_text":"{\"a\":{\"b\":[1]},\"x\":[{\"y\":2},{\"z\":3}]}\n","expected_output":"{\n \"a.b.0\": 1,\n \"x.0.y\": 2,\n \"x.1.z\": 3\n}\n","validation_input":"{\"a\":{\"b\":[\"p q r\"]},\"w\":[{\"x\":null},{\"y\":false},{\"z\":3}]}\n","validation_output":"{\n \"a.b.0\": \"p q r\",\n \"w.0.x\": null,\n \"w.1.y\": false,\n \"w.2.z\": 3\n}\n","family":"real-stackoverflow","difficulty":3,"split":"test","source":"stackoverflow-accepted-answer","license":"CC-BY-SA-4.0","question_url":"https://stackoverflow.com/questions/42299905/using-jq-flatten-arbitrary-json-to-delimiter-separated-flat-dictionary","question_title":"Using jq, Flatten Arbitrary JSON to Delimiter-Separated Flat Dictionary","question_owner":"Steve Amerige","answer_owner":"Jeff Mercado","answer_id":42303836,"question_score":11,"reviewed":true}
{"id":"so-42635140","request":"Recursively delete all keys from the JSON object that match the pattern 'temp' (case-insensitive).","command":"jq 'walk(if type == \"object\" then with_entries(select(.key | test(\"temp\"; \"i\") | not)) else . end)'","input_text":"{\"name\": \"root\", \"tempFile\": \"delete_me\", \"nested\": {\"keep\": \"safe\", \"TempVar\": \"delete_me_too\", \"deep\": {\"anotherTemp\": \"gone\"}}}","expected_output":"{\n \"name\": \"root\",\n \"nested\": {\n \"keep\": \"safe\",\n \"deep\": {}\n }\n}\n","validation_input":"{\"config\": {\"temporary\": true, \"valid\": false}, \"list\": [{\"item\": \"ok\", \"tempId\": 123}]}","validation_output":"{\n \"config\": {\n \"valid\": false\n },\n \"list\": [\n {\n \"item\": \"ok\"\n }\n ]\n}\n","family":"real-stackoverflow","difficulty":3,"split":"test","source":"stackoverflow-accepted-answer","license":"CC-BY-SA-4.0","question_url":"https://stackoverflow.com/questions/42635140/jq-recursively-delete-all-keys-that-match-a-given-pattern","question_title":"Jq: recursively delete all keys that match a given pattern","question_owner":"Kshitiz Sharma","answer_owner":"peak","answer_id":42636398,"question_score":13,"reviewed":true}
{"id":"so-43595121","request":"Extract the final segment of the 'id' string found within the nested 'networkInterfaces' array for each object in the input array.","command":"jq -r '.[].networkProfile.networkInterfaces[].id | sub(\".*/\";\"\")'","input_text":"[{\"id\":\"/subs/blah/vms/A10VM\",\"networkProfile\":{\"networkInterfaces\":[{\"id\":\"/subs/blah/nics/A10NIC-data\",\"resourceGroup\":\"RG1\"}]}}]","expected_output":"A10NIC-data\n","validation_input":"[{\"id\":\"/sub/rg/vm/MyVM\",\"networkProfile\":{\"networkInterfaces\":[{\"id\":\"/sub/rg/nic/MyNic-01\",\"resourceGroup\":\"RG2\"},{\"id\":\"/sub/rg/nic/MyNic-02\",\"resourceGroup\":\"RG2\"}]}}]","validation_output":"MyNic-01\nMyNic-02\n","family":"real-stackoverflow","difficulty":3,"split":"test","source":"stackoverflow-accepted-answer","license":"CC-BY-SA-4.0","question_url":"https://stackoverflow.com/questions/43595121/linux-cli-how-to-get-substring-from-json-jq-grep","question_title":"Linux CLI - How to get substring from JSON jq + grep?","question_owner":"Adoyt","answer_owner":"peak","answer_id":43595321,"question_score":11,"reviewed":true}
{"id":"so-44032450","request":"Extract the 'password' and 'username' values from the 'data' object in a JSON structure.","command":"jq '.data.password, .data.username'","input_text":"{\n \"request_id\": \"9a081c0c-9401-7eca-f55d-50e3b7c0301c\",\n \"lease_id\": \"\",\n \"renewable\": false,\n \"lease_duration\": 2764800,\n \"data\": {\n \"password\": \"test123\",\n \"username\": \"testuser1\"\n },\n \"wrap_info\": null,\n \"warnings\": null,\n \"auth\": null\n}","expected_output":"\"test123\"\n\"testuser1\"\n","validation_input":"{\n \"data\": {\n \"password\": \"secret_pass\",\n \"username\": \"admin_user\"\n }\n}","validation_output":"\"secret_pass\"\n\"admin_user\"\n","family":"real-stackoverflow","difficulty":3,"split":"test","source":"stackoverflow-accepted-answer","license":"CC-BY-SA-4.0","question_url":"https://stackoverflow.com/questions/44032450/parse-through-json-using-only-bash","question_title":"Parse through JSON using only Bash","question_owner":"user4889345","answer_owner":"grundic","answer_id":44032543,"question_score":11,"reviewed":true}
{"id":"so-45548604","request":"Select the 3rd-to-last and 4th-to-last elements from a JSON array and return them as a new array in that order.","command":"jq '[.[-3], .[-4]]'","input_text":"[\n {\"foo\": \"bar\", \"foo2\": \"bar2\"},\n {\"foo3\": \"bar3\", \"foo4\": \"bar4\"},\n {\"foo5\": \"bar5\", \"foo6\": \"bar6\"},\n {\"foo7\": \"bar7\", \"foo8\": \"bar8\"},\n {\"foo9\": \"bar9\", \"foo10\": \"bar10\"}\n]","expected_output":"[\n {\n \"foo5\": \"bar5\",\n \"foo6\": \"bar6\"\n },\n {\n \"foo3\": \"bar3\",\n \"foo4\": \"bar4\"\n }\n]\n","validation_input":"[\n {\"a\": 1},\n {\"b\": 2},\n {\"c\": 3},\n {\"d\": 4},\n {\"e\": 5},\n {\"f\": 6}\n]","validation_output":"[\n {\n \"d\": 4\n },\n {\n \"c\": 3\n }\n]\n","family":"real-stackoverflow","difficulty":3,"split":"test","source":"stackoverflow-accepted-answer","license":"CC-BY-SA-4.0","question_url":"https://stackoverflow.com/questions/45548604/jq-select-range","question_title":"jq: Select range","question_owner":"Alex","answer_owner":"peak","answer_id":45549004,"question_score":14,"reviewed":true}
{"id":"so-46397592","request":"Remove duplicate objects from the 'Result' array based on unique combinations of 'name' and 'id', keeping the first occurrence of each combination.","command":"jq '.Result |= unique_by({name, id})'","input_text":"{\"Result\":[{\"name\":\"validation-of-art\",\"id\":\"12\",\"status\":\"passed\",\"duration\":4740302},{\"name\":\"validation-of-art\",\"id\":\"12\",\"status\":\"passed\",\"duration\":272320},{\"name\":\"validation-of-art\",\"id\":\"13\",\"status\":\"passed\",\"duration\":272320}]}","expected_output":"{\n \"Result\": [\n {\n \"name\": \"validation-of-art\",\n \"id\": \"12\",\n \"status\": \"passed\",\n \"duration\": 4740302\n },\n {\n \"name\": \"validation-of-art\",\n \"id\": \"13\",\n \"status\": \"passed\",\n \"duration\": 272320\n }\n ]\n}\n","validation_input":"{\"Result\":[{\"name\":\"test-a\",\"id\":\"1\",\"val\":1},{\"name\":\"test-a\",\"id\":\"1\",\"val\":2},{\"name\":\"test-b\",\"id\":\"2\",\"val\":3}]}","validation_output":"{\n \"Result\": [\n {\n \"name\": \"test-a\",\n \"id\": \"1\",\n \"val\": 1\n },\n {\n \"name\": \"test-b\",\n \"id\": \"2\",\n \"val\": 3\n }\n ]\n}\n","family":"real-stackoverflow","difficulty":3,"split":"test","source":"stackoverflow-accepted-answer","license":"CC-BY-SA-4.0","question_url":"https://stackoverflow.com/questions/46397592/jq-removing-duplicates-using-unique-by","question_title":"JQ - removing duplicates using unique_by","question_owner":"Saurabh","answer_owner":"jq170727","answer_id":46397650,"question_score":11,"reviewed":true}
{"id":"so-47371280","request":"Recursively delete all keys named 'publicAccess' or 'userGroupAccesses' from the JSON object.","command":"jq 'del(.. | .publicAccess?, .userGroupAccesses?)'","input_text":"{\"data\": [{\"name\": \"Test\", \"program\": {\"publicAccess\": \"--------\", \"externalAccess\": false, \"userGroupAccesses\": [{\"access\": \"r-------\"}, {\"access\": \"rw------\"}], \"id\": \"MmBqeMLIC2r\"}, \"publicAccess\": \"rw------\"}]}","expected_output":"{\n \"data\": [\n {\n \"name\": \"Test\",\n \"program\": {\n \"externalAccess\": false,\n \"id\": \"MmBqeMLIC2r\"\n }\n }\n ]\n}\n","validation_input":"{\"data\": [{\"name\": \"Item\", \"program\": {\"publicAccess\": \"x\", \"internal\": true, \"userGroupAccesses\": [], \"code\": 123}, \"publicAccess\": \"y\"}, {\"simple\": \"value\"}]}","validation_output":"{\n \"data\": [\n {\n \"name\": \"Item\",\n \"program\": {\n \"internal\": true,\n \"code\": 123\n }\n },\n {\n \"simple\": \"value\"\n }\n ]\n}\n","family":"real-stackoverflow","difficulty":3,"split":"test","source":"stackoverflow-accepted-answer","license":"CC-BY-SA-4.0","question_url":"https://stackoverflow.com/questions/47371280/delete-objects-and-arrays-with-jq-which-match-a-key","question_title":"Delete objects and arrays with jq which match a key","question_owner":"dh762","answer_owner":"jq170727","answer_id":47371754,"question_score":17,"reviewed":true}
{"id":"so-47551333","request":"Convert a JSON array of objects containing 'tone_id' and 'score' fields into a single object where keys are the 'tone_id' values and values are the corresponding 'score' values.","command":"jq 'map({(.tone_id): .score}) | add'","input_text":"[\n {\"tone_id\": \"anger\", \"score\": 0.012, \"tone_name\": \"Anger\"},\n {\"tone_id\": \"disgust\", \"score\": 0.002, \"tone_name\": \"Disgust\"},\n {\"tone_id\": \"fear\", \"score\": 0.14, \"tone_name\": \"Fear\"},\n {\"tone_id\": \"joy\", \"score\": 0.42, \"tone_name\": \"Joy\"}\n]","expected_output":"{\n \"anger\": 0.012,\n \"disgust\": 0.002,\n \"fear\": 0.14,\n \"joy\": 0.42\n}\n","validation_input":"[\n {\"tone_id\": \"sadness\", \"score\": 0.5, \"tone_name\": \"Sadness\"},\n {\"tone_id\": \"joy\", \"score\": 0.5, \"tone_name\": \"Joy\"}\n]","validation_output":"{\n \"sadness\": 0.5,\n \"joy\": 0.5\n}\n","family":"real-stackoverflow","difficulty":3,"split":"test","source":"stackoverflow-accepted-answer","license":"CC-BY-SA-4.0","question_url":"https://stackoverflow.com/questions/47551333/jq-convert-a-list-of-objects-into-a-summarized-object","question_title":"jq - convert a list of objects into a summarized object","question_owner":"munikarmanish","answer_owner":"peak","answer_id":47553076,"question_score":11,"reviewed":true}
{"id":"so-48005870","request":"Extract the id, name, and create date from each object within the newList dictionary, outputting them as space-separated values on separate lines.","command":"jq -r '.newList[] | \"\\(.id) \\(.name) \\(.create.date)\"'","input_text":"{\"newList\": {\"243\": {\"id\": \"243\", \"name\": \"test\", \"create\": {\"date\": \"2017-08-31 13:57:29\"}}, \"244\": {\"id\": \"244\", \"name\": \"example\", \"create\": {\"date\": \"2017-09-01 10:00:00\"}}}}","expected_output":"243 test 2017-08-31 13:57:29\n244 example 2017-09-01 10:00:00\n","validation_input":"{\"newList\": {\"100\": {\"id\": \"100\", \"name\": \"alpha\", \"create\": {\"date\": \"2020-01-01 00:00:00\"}}, \"101\": {\"id\": \"101\", \"name\": \"beta\", \"create\": {\"date\": \"2020-01-02 12:30:00\"}}}}","validation_output":"100 alpha 2020-01-01 00:00:00\n101 beta 2020-01-02 12:30:00\n","family":"real-stackoverflow","difficulty":3,"split":"test","source":"stackoverflow-accepted-answer","license":"CC-BY-SA-4.0","question_url":"https://stackoverflow.com/questions/48005870/iterate-over-json-with-jq","question_title":"Iterate over json with jq","question_owner":"SnIpY","answer_owner":"Inian","answer_id":48006169,"question_score":13,"reviewed":true}
{"id":"so-48904371","request":"Extract the value of the 'type' field for every root-level key that ends with a slash '/'. Output each value on a separate line.","command":"jq -r '. as $o | keys_unsorted[] | select(endswith(\"/\")) | $o[.].type'","input_text":"{\"token/\": {\"accessor\": \"auth_token_909d6a81\", \"type\": \"token\"}, \"userpass/\": {\"description\": \"\", \"type\": \"userpass\"}, \"request_id\": \"f2a4c135\", \"data\": {\"more_data\": \"snipped\"}}","expected_output":"token\nuserpass\n","validation_input":"{\"ldap/\": {\"url\": \"ldap://example.com\", \"type\": \"ldap\"}, \"okta/\": {\"org_url\": \"https://example.okta.com\", \"type\": \"okta\"}, \"meta\": {\"status\": \"ok\"}}","validation_output":"ldap\nokta\n","family":"real-stackoverflow","difficulty":3,"split":"test","source":"stackoverflow-accepted-answer","license":"CC-BY-SA-4.0","question_url":"https://stackoverflow.com/questions/48904371/jq-filter-input-based-on-if-key-ends-with-specified-string","question_title":"jq: filter input based on if key ends with specified string","question_owner":"ssc","answer_owner":"RomanPerekhrest","answer_id":48904944,"question_score":16,"reviewed":true}
{"id":"so-49200066","request":"Given a JSON array of objects representing GitLab groups, filter out objects where 'parent_id' is null, sort the remaining objects by 'parent_id', and output the 'name' and 'parent_id' of each object as tab-separated values.","command":"jq -r 'map(select(.parent_id != null)) | sort_by(.parent_id)[] | [.name, .parent_id] | @tsv'","input_text":"[{\"id\":10,\"name\":\"another-test\",\"parent_id\":9},{\"id\":11,\"name\":\"asdfg\",\"parent_id\":7},{\"id\":12,\"name\":\"no-parent\",\"parent_id\":null}]","expected_output":"asdfg\t7\nanother-test\t9\n","validation_input":"[{\"id\":1,\"name\":\"GroupC\",\"parent_id\":3},{\"id\":2,\"name\":\"GroupA\",\"parent_id\":1},{\"id\":3,\"name\":\"GroupB\",\"parent_id\":null}]","validation_output":"GroupA\t1\nGroupC\t3\n","family":"real-stackoverflow","difficulty":3,"split":"test","source":"stackoverflow-accepted-answer","license":"CC-BY-SA-4.0","question_url":"https://stackoverflow.com/questions/49200066/jq-select-and-sort-by","question_title":"jq select() and sort_by()","question_owner":"Bruno9779","answer_owner":"RomanPerekhrest","answer_id":49200556,"question_score":15,"reviewed":true}
{"id":"so-49228126","request":"Convert each JSON object in the input stream into a CSV row, preserving the order of values as they appear in the object.","command":"jq -r '[.[]] | @csv'","input_text":"{\"ClientCountry\":\"ca\",\"ClientASN\":812,\"CacheResponseStatus\":404,\"CacheResponseBytes\":130756,\"CacheCacheStatus\":\"hit\"}\n{\"ClientCountry\":\"ua\",\"ClientASN\":206996,\"CacheResponseStatus\":301,\"CacheResponseBytes\":142,\"CacheCacheStatus\":\"unknown\"}","expected_output":"\"ca\",812,404,130756,\"hit\"\n\"ua\",206996,301,142,\"unknown\"\n","validation_input":"{\"ClientCountry\":\"de\",\"ClientASN\":123,\"CacheResponseStatus\":200,\"CacheResponseBytes\":500,\"CacheCacheStatus\":\"miss\"}\n{\"ClientCountry\":\"fr\",\"ClientASN\":456,\"CacheResponseStatus\":500,\"CacheResponseBytes\":0,\"CacheCacheStatus\":\"error\"}","validation_output":"\"de\",123,200,500,\"miss\"\n\"fr\",456,500,0,\"error\"\n","family":"real-stackoverflow","difficulty":3,"split":"test","source":"stackoverflow-accepted-answer","license":"CC-BY-SA-4.0","question_url":"https://stackoverflow.com/questions/49228126/how-to-convert-json-into-csv-file-using-jq","question_title":"How to convert json into csv file using jq?","question_owner":"Palanikumar","answer_owner":"peak","answer_id":49228411,"question_score":12,"reviewed":true}
{"id":"so-49342129","request":"Transform a JSON array of commit objects into a single JSON object with a key \"Commits\" containing an array of objects, each having \"message\" and \"name\" fields extracted from the nested commit structure.","command":"jq '{Commits: [.[] | {message: .commit.message, name: .commit.committer.name}]}'","input_text":"[\n {\n \"commit\": {\n \"message\": \"Merge pull request #162\",\n \"committer\": {\n \"name\": \"Stephen Dolan\"\n }\n }\n },\n {\n \"commit\": {\n \"message\": \"Reject all overlong UTF8 sequences.\",\n \"committer\": {\n \"name\": \"Stephen Dolan\"\n }\n }\n }\n]","expected_output":"{\n \"Commits\": [\n {\n \"message\": \"Merge pull request #162\",\n \"name\": \"Stephen Dolan\"\n },\n {\n \"message\": \"Reject all overlong UTF8 sequences.\",\n \"name\": \"Stephen Dolan\"\n }\n ]\n}\n","validation_input":"[\n {\n \"commit\": {\n \"message\": \"Fix bug in parser\",\n \"committer\": {\n \"name\": \"Jane Doe\"\n }\n }\n },\n {\n \"commit\": {\n \"message\": \"Update documentation\",\n \"committer\": {\n \"name\": \"John Smith\"\n }\n }\n },\n {\n \"commit\": {\n \"message\": \"Refactor core module\",\n \"committer\": {\n \"name\": \"Alice Johnson\"\n }\n }\n }\n]","validation_output":"{\n \"Commits\": [\n {\n \"message\": \"Fix bug in parser\",\n \"name\": \"Jane Doe\"\n },\n {\n \"message\": \"Update documentation\",\n \"name\": \"John Smith\"\n },\n {\n \"message\": \"Refactor core module\",\n \"name\": \"Alice Johnson\"\n }\n ]\n}\n","family":"real-stackoverflow","difficulty":3,"split":"test","source":"stackoverflow-accepted-answer","license":"CC-BY-SA-4.0","question_url":"https://stackoverflow.com/questions/49342129/jq-to-output-results-as-json","question_title":"jq to output results as JSON","question_owner":"xpt","answer_owner":"peak","answer_id":49342492,"question_score":15,"reviewed":true}
{"id":"so-50255694","request":"Given a JSON array of strings, filter out any string that starts with an uppercase letter. Return the remaining strings in an array.","command":"jq '[.[] | select(test(\"^[A-Z]\") | not)]'","input_text":"[\"Dog\", \"cat\", \"Bird\"]","expected_output":"[\n \"cat\"\n]\n","validation_input":"[\"Apple\", \"banana\", \"Cherry\", \"date\"]","validation_output":"[\n \"banana\",\n \"date\"\n]\n","family":"real-stackoverflow","difficulty":3,"split":"test","source":"stackoverflow-accepted-answer","license":"CC-BY-SA-4.0","question_url":"https://stackoverflow.com/questions/50255694/jq-negative-select-elements-of-array","question_title":"jq negative select elements of array","question_owner":"Konrads","answer_owner":"peak","answer_id":50255988,"question_score":14,"reviewed":true}
{"id":"so-50741593","request":"Sort the items in each object of the input array by their lastTimestamp field in ascending order.","command":"jq '.[].items |= sort_by(.lastTimestamp)'","input_text":"[\n {\n \"apiVersion\": \"v1\",\n \"items\": [\n {\n \"lastTimestamp\": \"2018-06-07T16:02:52Z\",\n \"name\": \"event-b\"\n },\n {\n \"lastTimestamp\": \"2018-06-07T11:59:53Z\",\n \"name\": \"event-a\"\n }\n ]\n }\n]","expected_output":"[\n {\n \"apiVersion\": \"v1\",\n \"items\": [\n {\n \"lastTimestamp\": \"2018-06-07T11:59:53Z\",\n \"name\": \"event-a\"\n },\n {\n \"lastTimestamp\": \"2018-06-07T16:02:52Z\",\n \"name\": \"event-b\"\n }\n ]\n }\n]\n","validation_input":"[\n {\n \"apiVersion\": \"v1\",\n \"items\": [\n {\n \"lastTimestamp\": \"2018-06-08T10:00:00Z\",\n \"name\": \"z-event\"\n },\n {\n \"lastTimestamp\": \"2018-06-07T09:00:00Z\",\n \"name\": \"a-event\"\n },\n {\n \"lastTimestamp\": \"2018-06-07T12:00:00Z\",\n \"name\": \"m-event\"\n }\n ]\n },\n {\n \"apiVersion\": \"v1\",\n \"items\": []\n }\n]","validation_output":"[\n {\n \"apiVersion\": \"v1\",\n \"items\": [\n {\n \"lastTimestamp\": \"2018-06-07T09:00:00Z\",\n \"name\": \"a-event\"\n },\n {\n \"lastTimestamp\": \"2018-06-07T12:00:00Z\",\n \"name\": \"m-event\"\n },\n {\n \"lastTimestamp\": \"2018-06-08T10:00:00Z\",\n \"name\": \"z-event\"\n }\n ]\n },\n {\n \"apiVersion\": \"v1\",\n \"items\": []\n }\n]\n","family":"real-stackoverflow","difficulty":3,"split":"test","source":"stackoverflow-accepted-answer","license":"CC-BY-SA-4.0","question_url":"https://stackoverflow.com/questions/50741593/how-can-i-use-jq-to-sort-by-datetime-field","question_title":"How can I use jq to sort by datetime field?","question_owner":"Chris Stryczynski","answer_owner":"RomanPerekhrest","answer_id":50742286,"question_score":17,"reviewed":true}
{"id":"so-51147753","request":"Add the keys 'x3' with value 'x3Val' and 'x4' with value 'x4Val' to the object located at key 'x'.","command":"jq '.x += {\"x3\": \"x3Val\", \"x4\": \"x4Val\"}'","input_text":"{\"a\": \"aVal\", \"x\": {\"x1\": \"x1Val\", \"x2\": \"x2Val\"}, \"y\": {\"y1\": \"y1Val\"}}","expected_output":"{\n \"a\": \"aVal\",\n \"x\": {\n \"x1\": \"x1Val\",\n \"x2\": \"x2Val\",\n \"x3\": \"x3Val\",\n \"x4\": \"x4Val\"\n },\n \"y\": {\n \"y1\": \"y1Val\"\n }\n}\n","validation_input":"{\"a\": \"test\", \"x\": {\"x1\": \"1\"}, \"y\": {}}","validation_output":"{\n \"a\": \"test\",\n \"x\": {\n \"x1\": \"1\",\n \"x3\": \"x3Val\",\n \"x4\": \"x4Val\"\n },\n \"y\": {}\n}\n","family":"real-stackoverflow","difficulty":3,"split":"test","source":"stackoverflow-accepted-answer","license":"CC-BY-SA-4.0","question_url":"https://stackoverflow.com/questions/51147753/append-json-objects-using-jq","question_title":"Append JSON Objects using jq","question_owner":"theapache64","answer_owner":"RomanPerekhrest","answer_id":51148168,"question_score":10,"reviewed":true}
{"id":"so-51869431","request":"Filter an object to keep only the key-value pairs where the key contains the string \"VMIMAGE\", preserving the original keys.","command":"jq 'with_entries( select(.key | contains(\"VMIMAGE\")) )'","input_text":"{\n \"CP-COMPUTEENGINE-VMIMAGE-F1-MICRO\": \"value1\",\n \"CP-COMPUTEENGINE-VMIMAGE-N1-STANDARD-1\": \"value2\",\n \"OTHER-KEY\": \"value3\",\n \"ANOTHER-KEY\": \"value4\"\n}","expected_output":"{\n \"CP-COMPUTEENGINE-VMIMAGE-F1-MICRO\": \"value1\",\n \"CP-COMPUTEENGINE-VMIMAGE-N1-STANDARD-1\": \"value2\"\n}\n","validation_input":"{\n \"AWS-VMIMAGE-T2-MICRO\": \"aws-val1\",\n \"AZURE-VMIMAGE-B1S\": \"azure-val1\",\n \"CP-COMPUTEENGINE-VMIMAGE-G1-SMALL\": \"gcp-val1\",\n \"DATABASE-URL\": \"db-val\",\n \"API-KEY\": \"secret\"\n}","validation_output":"{\n \"AWS-VMIMAGE-T2-MICRO\": \"aws-val1\",\n \"AZURE-VMIMAGE-B1S\": \"azure-val1\",\n \"CP-COMPUTEENGINE-VMIMAGE-G1-SMALL\": \"gcp-val1\"\n}\n","family":"real-stackoverflow","difficulty":3,"split":"test","source":"stackoverflow-accepted-answer","license":"CC-BY-SA-4.0","question_url":"https://stackoverflow.com/questions/51869431/using-jq-select-elements-with-keys-containing-some-string-key-preserved-in-resu","question_title":"Using jq select elements with keys containing some string, key preserved in results","question_owner":"Mzq","answer_owner":"peak","answer_id":51870918,"question_score":15,"reviewed":true}
{"id":"so-53473584","request":"Convert the 'lotsize' field to acres by dividing by 43560, and convert the 'dateSold' Unix timestamp to a formatted date string 'Day Month DD, YYYY'. Output the result as a compact JSON object with keys 'acres' and 'soldOn'.","command":"jq -c '{acres: (.lotsize/43560), soldOn: (.dateSold | strftime(\"%A %B %d, %Y\")) }'","input_text":"{\"lotsize\": 65340, \"dateSold\": 1207897200}","expected_output":"{\"acres\":1.5,\"soldOn\":\"Friday April 11, 2008\"}\n","validation_input":"{\"lotsize\": 43560, \"dateSold\": 1609459200}","validation_output":"{\"acres\":1,\"soldOn\":\"Friday January 01, 2021\"}\n","family":"real-stackoverflow","difficulty":3,"split":"test","source":"stackoverflow-accepted-answer","license":"CC-BY-SA-4.0","question_url":"https://stackoverflow.com/questions/53473584/jq-and-math-functions","question_title":"jq and Math functions","question_owner":"richb-hanover","answer_owner":"peak","answer_id":53474079,"question_score":18,"reviewed":true}
{"id":"so-54489648","request":"Given a JSON array of objects with 'createdAt' and 'platform' fields, find the maximum 'createdAt' value among objects where 'platform' is 'foo'.","command":"jq '[.[] | select(.platform == \"foo\") | .createdAt] | max'","input_text":"[\n {\"createdAt\": 1548729542000, \"platform\": \"foo\"},\n {\"createdAt\": 1548759398000, \"platform\": \"foo\"},\n {\"createdAt\": 1548912360000, \"platform\": \"foo\"},\n {\"createdAt\": 1548904550000, \"platform\": \"bar\"}\n]","expected_output":"1548912360000\n","validation_input":"[\n {\"createdAt\": 100, \"platform\": \"foo\"},\n {\"createdAt\": 200, \"platform\": \"bar\"},\n {\"createdAt\": 300, \"platform\": \"foo\"}\n]","validation_output":"300\n","family":"real-stackoverflow","difficulty":3,"split":"test","source":"stackoverflow-accepted-answer","license":"CC-BY-SA-4.0","question_url":"https://stackoverflow.com/questions/54489648/how-to-get-max-value-from-json","question_title":"How to get max value from JSON?","question_owner":"zhuguowei","answer_owner":"oguz ismail","answer_id":54489836,"question_score":11,"reviewed":true}
{"id":"so-55027717","request":"Recursively search a JSON structure for any key named 'name' and output all non-null values found associated with that key.","command":"jq '.. | .name? | select(. != null)'","input_text":"{\"file\":{\"id\":\"123456789\",\"name\":\"137.txt\"},\"lines\":219,\"characters\":2456}\n","expected_output":"\"137.txt\"\n","validation_input":"{\"user\":{\"profile\":{\"name\":\"Alice\"}},\"settings\":{\"theme\":\"dark\"},\"items\":[{\"name\":\"Item1\"},{\"id\":2}]}\n","validation_output":"\"Alice\"\n\"Item1\"\n","family":"real-stackoverflow","difficulty":3,"split":"test","source":"stackoverflow-accepted-answer","license":"CC-BY-SA-4.0","question_url":"https://stackoverflow.com/questions/55027717/jq-accessing-element-no-matter-how-many-levels-deep","question_title":"JQ: accessing element no matter how many levels deep","question_owner":"Olaf","answer_owner":"Inian","answer_id":55028089,"question_score":11,"reviewed":true}
{"id":"so-56690455","request":"From a JSON object containing a 'certificates' array, select the certificate objects where 'variable_path' is not null and contains the string 'thing'.","command":"jq '.certificates[] | select(.variable_path | strings | test(\"thing\"))'","input_text":"{\n \"certificates\": [\n {\n \"configurable\": false,\n \"property_reference\": \".properties.director_ssl\",\n \"property_type\": \"rsa_cert_credentials\",\n \"product_guid\": \"p-blah-29d4678e926cf2069871\",\n \"location\": \"ops_manager\",\n \"variable_path\": null,\n \"issuer\": \"/C=US/O=Blah\",\n \"valid_from\": \"2019-01-16T19:55:10Z\",\n \"valid_until\": \"2021-01-16T19:55:10Z\"\n },\n {\n \"configurable\": false,\n \"property_reference\": \".properties.uaa_ssl\",\n \"property_type\": \"rsa_cert_credentials\",\n \"product_guid\": \"p-blah-29d4678e926cf2069871\",\n \"location\": \"ops_manager\",\n \"variable_path\": null,\n \"issuer\": \"/C=US/O=Blah\",\n \"valid_from\": \"2019-01-16T19:55:10Z\",\n \"valid_until\": \"2021-01-16T19:55:10Z\"\n },\n {\n \"configurable\": false,\n \"property_reference\": \".properties.blobstore_certificate\",\n \"property_type\": \"rsa_cert_credentials\",\n \"product_guid\": \"p-blah-29d4678e926cf2069871\",\n \"location\": \"ops_manager\",\n \"variable_path\": \"something\",\n \"issuer\": \"/C=US/O=Blah\",\n \"valid_from\": \"2019-01-16T19:55:11Z\",\n \"valid_until\": \"2021-01-16T19:55:11Z\"\n }\n ]\n}","expected_output":"{\n \"configurable\": false,\n \"property_reference\": \".properties.blobstore_certificate\",\n \"property_type\": \"rsa_cert_credentials\",\n \"product_guid\": \"p-blah-29d4678e926cf2069871\",\n \"location\": \"ops_manager\",\n \"variable_path\": \"something\",\n \"issuer\": \"/C=US/O=Blah\",\n \"valid_from\": \"2019-01-16T19:55:11Z\",\n \"valid_until\": \"2021-01-16T19:55:11Z\"\n}\n","validation_input":"{\n \"certificates\": [\n {\n \"variable_path\": null\n },\n {\n \"variable_path\": \"nothing_here\"\n },\n {\n \"variable_path\": \"my_thing_value\"\n }\n ]\n}","validation_output":"{\n \"variable_path\": \"nothing_here\"\n}\n{\n \"variable_path\": \"my_thing_value\"\n}\n","family":"real-stackoverflow","difficulty":3,"split":"test","source":"stackoverflow-accepted-answer","license":"CC-BY-SA-4.0","question_url":"https://stackoverflow.com/questions/56690455/jq-select-objects-where-value-contains-string-and-value-not-null","question_title":"JQ Select Objects Where Value Contains String And Value Not Null","question_owner":"Radford","answer_owner":"peak","answer_id":56690698,"question_score":11,"reviewed":true}
{"id":"so-56909701","request":"Given a stream of JSON objects (JSON Lines), extract the 'email' and 'time' fields from each object, ignoring any objects where 'email' is missing or null. Aggregate the results into a single JSON array.","command":"jq -s '[.[] | select(.email) | {email, time}]'","input_text":"{\"name\":\"myname\", \"environment\":\"staging\", \"email\":\"email1@example.com\", \"time\":\"2017-04-02T05:00:00.046Z\"}\n{\"name\":\"myname\", \"environment\":\"staging\", \"email\":\"email2@example.com\", \"time\":\"2017-02-02T05:00:00.046Z\"}\n{\"name\":\"myothername\", \"environment\":\"staging\", \"time\":\"2017-10-02T05:00:00.046Z\"}","expected_output":"[\n {\n \"email\": \"email1@example.com\",\n \"time\": \"2017-04-02T05:00:00.046Z\"\n },\n {\n \"email\": \"email2@example.com\",\n \"time\": \"2017-02-02T05:00:00.046Z\"\n }\n]\n","validation_input":"{\"email\":\"user@test.com\", \"time\":\"2023-01-01T00:00:00Z\"}\n{\"time\":\"2023-01-02T00:00:00Z\"}\n{\"email\":\"admin@test.com\", \"time\":\"2023-01-03T00:00:00Z\"}","validation_output":"[\n {\n \"email\": \"user@test.com\",\n \"time\": \"2023-01-01T00:00:00Z\"\n },\n {\n \"email\": \"admin@test.com\",\n \"time\": \"2023-01-03T00:00:00Z\"\n }\n]\n","family":"real-stackoverflow","difficulty":3,"split":"test","source":"stackoverflow-accepted-answer","license":"CC-BY-SA-4.0","question_url":"https://stackoverflow.com/questions/56909701/aggregate-the-results-of-a-jq-query-into-a-single-array","question_title":"Aggregate the results of a jq query into a single array","question_owner":"Acapulco","answer_owner":"peak","answer_id":56910388,"question_score":14,"reviewed":true}
{"id":"so-57649735","request":"Transform the input JSON by renaming 'temperature' to 'temp', 'humidity' to 'hum', and extracting the numeric ID following 'ID ' in the 'message' field into an 'id' field.","command":"jq '{temp: .temperature, hum: .humidity, id: (.message | capture(\"ID (?<id>[[:digit:]]+)\").id)}'","input_text":"{\"temperature\":\"21\", \"humidity\":\"12.3\", \"message\":\"Today ID 342 is running\"}","expected_output":"{\n \"temp\": \"21\",\n \"hum\": \"12.3\",\n \"id\": \"342\"\n}\n","validation_input":"{\"temperature\":\"10\", \"humidity\":\"50.0\", \"message\":\"Sensor ID 99 detected\"}","validation_output":"{\n \"temp\": \"10\",\n \"hum\": \"50.0\",\n \"id\": \"99\"\n}\n","family":"real-stackoverflow","difficulty":3,"split":"test","source":"stackoverflow-accepted-answer","license":"CC-BY-SA-4.0","question_url":"https://stackoverflow.com/questions/57649735/how-to-extract-a-json-value-substring-with-jq","question_title":"How to extract a json value substring with jq","question_owner":"alcor","answer_owner":"Charles Duffy","answer_id":57649785,"question_score":13,"reviewed":true}
{"id":"so-58566524","request":"Given a JSON object containing an array of repository objects under the key 'values', where each object has a 'name' and a 'links' object with a 'clone' array, output each HTTP clone URL followed by a space and the repository name on separate lines. Filter the clone links to only include those where the 'name' field is 'http'.","command":"jq -r '.values[] | (.links.clone[] | select(.name==\"http\") | .href) + \" \" + .name'","input_text":"{\"values\":[{\"name\":\"GitRepository1\",\"links\":{\"clone\":[{\"name\":\"http\",\"href\":\"http://bitbucketlocalserver:7990/scm/PROJECT_NAME/gitrepo1.git\"},{\"name\":\"ssh\",\"href\":\"ssh://git@bitbucketlocalserver:7990/PROJECT_NAME/gitrepo1.git\"}]}},{\"name\":\"GitRepository2\",\"links\":{\"clone\":[{\"name\":\"http\",\"href\":\"http://bitbucketlocalserver:7990/scm/PROJECT_NAME/gitrepo2.git\"}]}}]}","expected_output":"http://bitbucketlocalserver:7990/scm/PROJECT_NAME/gitrepo1.git GitRepository1\nhttp://bitbucketlocalserver:7990/scm/PROJECT_NAME/gitrepo2.git GitRepository2\n","validation_input":"{\"values\":[{\"name\":\"RepoA\",\"links\":{\"clone\":[{\"name\":\"http\",\"href\":\"http://example.com/repoA.git\"}]}},{\"name\":\"RepoB\",\"links\":{\"clone\":[{\"name\":\"ssh\",\"href\":\"ssh://example.com/repoB.git\"},{\"name\":\"http\",\"href\":\"http://example.com/repoB.git\"}]}}]}","validation_output":"http://example.com/repoA.git RepoA\nhttp://example.com/repoB.git RepoB\n","family":"real-stackoverflow","difficulty":3,"split":"test","source":"stackoverflow-accepted-answer","license":"CC-BY-SA-4.0","question_url":"https://stackoverflow.com/questions/58566524/jq-how-to-define-filter-to-remove-brackets-quotes-and-commas-from-output-arra","question_title":"JQ - How to define filter to remove brackets, quotes and commas from output array","question_owner":"adbdkb","answer_owner":"peak","answer_id":58567559,"question_score":15,"reviewed":true}
{"id":"so-60350315","request":"Format the 'filename', 'format_name', and 'tags.album_artist' fields from the input JSON into a single comma-separated line without surrounding quotes or CSV escaping.","command":"jq -r '[.format.filename,.format.format_name,.format.tags.album_artist] | join(\",\")'","input_text":"{\"format\":{\"filename\":\"01 Jubilee.flac\",\"format_name\":\"flac\",\"tags\":{\"album_artist\":\"Bill Charlap Trio\"}}}","expected_output":"01 Jubilee.flac,flac,Bill Charlap Trio\n","validation_input":"{\"format\":{\"filename\":\"song.mp3\",\"format_name\":\"mp3\",\"tags\":{\"album_artist\":\"Artist Name\"}}}","validation_output":"song.mp3,mp3,Artist Name\n","family":"real-stackoverflow","difficulty":3,"split":"test","source":"stackoverflow-accepted-answer","license":"CC-BY-SA-4.0","question_url":"https://stackoverflow.com/questions/60350315/why-does-the-jq-raw-output-argument-fail-to-remove-quotes-from-csv-output","question_title":"Why does the jq --raw-output argument fail to remove quotes from @csv output?","question_owner":"user5395338","answer_owner":"pii_ke","answer_id":62903250,"question_score":11,"reviewed":true}
{"id":"so-61396735","request":"Decode all base64-encoded values within the 'data' object, leaving the rest of the JSON structure unchanged. Output only the decoded 'data' object.","command":"jq '.data | map_values(@base64d)'","input_text":"{\"someattribute\": \"somevalue\", \"data\": {\"SOMENAME\": \"SGVsbG8=\", \"SOMEOTHERNAME\": \"V29ybGQ=\"}}","expected_output":"{\n \"SOMENAME\": \"Hello\",\n \"SOMEOTHERNAME\": \"World\"\n}\n","validation_input":"{\"id\": 1, \"data\": {\"KEY1\": \"YQ==\", \"KEY2\": \"Yg==\"}}","validation_output":"{\n \"KEY1\": \"a\",\n \"KEY2\": \"b\"\n}\n","family":"real-stackoverflow","difficulty":3,"split":"test","source":"stackoverflow-accepted-answer","license":"CC-BY-SA-4.0","question_url":"https://stackoverflow.com/questions/61396735/transform-json-object-with-jq-transforming-values-with-base64-decode","question_title":"Transform json object with jq, transforming values with base64 decode","question_owner":"David M. Karr","answer_owner":"Steve","answer_id":71600771,"question_score":10,"reviewed":true}
{"id":"so-61492210","request":"Convert the entire input JSON object into a single JSON-encoded string.","command":"jq -c 'tostring'","input_text":"{\"region\": \"CA\", \"waf_rule_tags\": \"{\\\"RULEID:942100\\\":[\\\"application-multi\\\"]}\"}","expected_output":"\"{\\\"region\\\":\\\"CA\\\",\\\"waf_rule_tags\\\":\\\"{\\\\\\\"RULEID:942100\\\\\\\":[\\\\\\\"application-multi\\\\\\\"]}\\\"}\"\n","validation_input":"{\"name\": \"test\", \"data\": \"{\\\"key\\\": \\\"value\\\"}\"}","validation_output":"\"{\\\"name\\\":\\\"test\\\",\\\"data\\\":\\\"{\\\\\\\"key\\\\\\\": \\\\\\\"value\\\\\\\"}\\\"}\"\n","family":"real-stackoverflow","difficulty":3,"split":"test","source":"stackoverflow-accepted-answer","license":"CC-BY-SA-4.0","question_url":"https://stackoverflow.com/questions/61492210/how-to-stringify-json-using-jq","question_title":"How to stringify JSON using JQ","question_owner":"Alex Cohen","answer_owner":"peak","answer_id":61492758,"question_score":13,"reviewed":true}
{"id":"so-63319824","request":"Filter JSON objects where the 'column3' field starts with 'ab', then output the values of 'column1', 'column2', and 'column3' as a CSV row.","command":"jq -r 'select(.column3 | startswith(\"ab\")) | [.column1, .column2, .column3] | @csv'","input_text":"{\"column1\": \"hello\", \"column2\": \"bye\", \"column3\": \"abc\"}\n{\"column1\": \"world\", \"column2\": \"hi\", \"column3\": \"xyz\"}","expected_output":"\"hello\",\"bye\",\"abc\"\n","validation_input":"{\"column1\": \"test1\", \"column2\": \"test2\", \"column3\": \"ab_test\"}\n{\"column1\": \"test3\", \"column2\": \"test4\", \"column3\": \"no_match\"}","validation_output":"\"test1\",\"test2\",\"ab_test\"\n","family":"real-stackoverflow","difficulty":3,"split":"test","source":"stackoverflow-accepted-answer","license":"CC-BY-SA-4.0","question_url":"https://stackoverflow.com/questions/63319824/how-to-add-contains-or-startswith-in-jq","question_title":"How to add contains or startswith in jq","question_owner":"artemisia480","answer_owner":"Shawn","answer_id":63320808,"question_score":10,"reviewed":true}
{"id":"so-65728085","request":"Sort a JSON array of objects by their 'TagVersion' field in ascending order, treating the version strings as semantic versions (e.g., 1.0.9 comes before 1.0.10).","command":"jq 'sort_by(.TagVersion | split(\".\") | map(tonumber))'","input_text":"[\n {\"TagVersion\": \"1.0.11\"},\n {\"TagVersion\": \"1.1.8\"},\n {\"TagVersion\": \"1.0.10\"},\n {\"TagVersion\": \"1.0.9\"},\n {\"TagVersion\": \"1.0.77\"}\n]","expected_output":"[\n {\n \"TagVersion\": \"1.0.9\"\n },\n {\n \"TagVersion\": \"1.0.10\"\n },\n {\n \"TagVersion\": \"1.0.11\"\n },\n {\n \"TagVersion\": \"1.0.77\"\n },\n {\n \"TagVersion\": \"1.1.8\"\n }\n]\n","validation_input":"[\n {\"TagVersion\": \"2.0.0\"},\n {\"TagVersion\": \"1.9.9\"},\n {\"TagVersion\": \"1.10.0\"}\n]","validation_output":"[\n {\n \"TagVersion\": \"1.9.9\"\n },\n {\n \"TagVersion\": \"1.10.0\"\n },\n {\n \"TagVersion\": \"2.0.0\"\n }\n]\n","family":"real-stackoverflow","difficulty":3,"split":"test","source":"stackoverflow-accepted-answer","license":"CC-BY-SA-4.0","question_url":"https://stackoverflow.com/questions/65728085/jq-sort-by-version-as-string","question_title":"jq sort by version as string","question_owner":"brcebn","answer_owner":"Amadan","answer_id":65728139,"question_score":10,"reviewed":true}
{"id":"so-70492898","request":"From a JSON object containing a 'fruits' array of objects with 'version' and 'price' fields, find the fruit with the highest version number and return its price.","command":"jq '.fruits | sort_by(-.version)[0].price'","input_text":"{\"fruits\":[{\"name\":\"banana\",\"color\":\"yellow\",\"price\":0.51,\"version\":1},{\"name\":\"banana\",\"color\":\"yellow\",\"price\":0.52,\"version\":2}]}\n","expected_output":"0.52\n","validation_input":"{\"fruits\":[{\"name\":\"apple\",\"color\":\"red\",\"price\":1.0,\"version\":3},{\"name\":\"apple\",\"color\":\"green\",\"price\":1.2,\"version\":1},{\"name\":\"orange\",\"color\":\"orange\",\"price\":0.8,\"version\":2}]}\n","validation_output":"1\n","family":"real-stackoverflow","difficulty":3,"split":"test","source":"stackoverflow-accepted-answer","license":"CC-BY-SA-4.0","question_url":"https://stackoverflow.com/questions/70492898/using-jq-how-to-sort-array-of-object","question_title":"using jq how to sort array of object","question_owner":"kumar","answer_owner":"jpseng","answer_id":70493529,"question_score":11,"reviewed":true}
{"id":"so-70628716","request":"For each item in the items array, if any container status has a waiting or terminated state, output the namespace, name, and the reason from either the waiting or terminated state (preferring waiting if both exist, though typically only one exists) as CSV.","command":"jq -r '.items[] | select(any(.status.containerStatuses[]; .state.waiting or .state.terminated)) | [.metadata.namespace, .metadata.name, (.status.containerStatuses[].state | (.waiting.reason // .terminated.reason))] | @csv'","input_text":"{\"items\": [{\"metadata\": {\"namespace\": \"default\", \"name\": \"pod-1\"}, \"status\": {\"containerStatuses\": [{\"state\": {\"waiting\": {\"reason\": \"CrashLoopBackOff\"}}}]}}, {\"metadata\": {\"namespace\": \"kube-system\", \"name\": \"pod-2\"}, \"status\": {\"containerStatuses\": [{\"state\": {\"terminated\": {\"reason\": \"Error\"}}}]}}]}","expected_output":"\"default\",\"pod-1\",\"CrashLoopBackOff\"\n\"kube-system\",\"pod-2\",\"Error\"\n","validation_input":"{\"items\": [{\"metadata\": {\"namespace\": \"prod\", \"name\": \"web-1\"}, \"status\": {\"containerStatuses\": [{\"state\": {\"waiting\": {\"reason\": \"ImagePullBackOff\"}}}]}}, {\"metadata\": {\"namespace\": \"dev\", \"name\": \"api-1\"}, \"status\": {\"containerStatuses\": [{\"state\": {\"terminated\": {\"reason\": \"OOMKilled\"}}}]}}]}","validation_output":"\"prod\",\"web-1\",\"ImagePullBackOff\"\n\"dev\",\"api-1\",\"OOMKilled\"\n","family":"real-stackoverflow","difficulty":3,"split":"test","source":"stackoverflow-accepted-answer","license":"CC-BY-SA-4.0","question_url":"https://stackoverflow.com/questions/70628716/print-from-jq-using-a-wild-card-or-coalesce-to-first-non-null","question_title":"Print from jq using a wild card (or coalesce to first non null)","question_owner":"Vaccano","answer_owner":"peak","answer_id":70629425,"question_score":13,"reviewed":true}
{"id":"so-72277908","request":"Sort an array of objects by the 'title' field in a case-insensitive manner.","command":"jq 'sort_by(.title | ascii_downcase)'","input_text":"[{\"title\": \"first\", \"description\": \"foo\"}, {\"title\": \"Second\", \"description\": \"bar\"}]","expected_output":"[\n {\n \"title\": \"first\",\n \"description\": \"foo\"\n },\n {\n \"title\": \"Second\",\n \"description\": \"bar\"\n }\n]\n","validation_input":"[{\"title\": \"Banana\", \"val\": 1}, {\"title\": \"apple\", \"val\": 2}, {\"title\": \"Cherry\", \"val\": 3}]","validation_output":"[\n {\n \"title\": \"apple\",\n \"val\": 2\n },\n {\n \"title\": \"Banana\",\n \"val\": 1\n },\n {\n \"title\": \"Cherry\",\n \"val\": 3\n }\n]\n","family":"real-stackoverflow","difficulty":3,"split":"test","source":"stackoverflow-accepted-answer","license":"CC-BY-SA-4.0","question_url":"https://stackoverflow.com/questions/72277908/how-to-sort-case-insensitive-using-jq","question_title":"how to sort case insensitive using jq","question_owner":"Mikhail Tokarev","answer_owner":"Mikhail Tokarev","answer_id":72277909,"question_score":10,"reviewed":true}
{"id":"so-74152553","request":"Round the input number to two decimal places.","command":"jq '.*100|round/100'","input_text":"20.152","expected_output":"20.15\n","validation_input":"3.14159","validation_output":"3.14\n","family":"real-stackoverflow","difficulty":3,"split":"test","source":"stackoverflow-accepted-answer","license":"CC-BY-SA-4.0","question_url":"https://stackoverflow.com/questions/74152553/jq-round-number-to-two-decimal-places","question_title":"JQ round number to two decimal places","question_owner":"Lucia","answer_owner":"knittl","answer_id":74152813,"question_score":16,"reviewed":true}
|