{"id":31067,"date":"2024-05-25T17:15:09","date_gmt":"2024-05-26T00:15:09","guid":{"rendered":"https:\/\/www.podfeet.com\/blog\/?p=31067"},"modified":"2024-05-25T17:15:09","modified_gmt":"2024-05-26T00:15:09","slug":"ccatp-794","status":"publish","type":"post","link":"https:\/\/www.podfeet.com\/blog\/2024\/05\/ccatp-794\/","title":{"rendered":"CCATP #794 Bart Busschots on PBS 166 of X \u2014 jq: Processing Arrays &#038; Dictionaries sans Explosion"},"content":{"rendered":"<p>In this penultimate jq episode of Programming By Stealth, Bart introduces us to three new ways to process arrays and dictionaries without exploding them first. I know that sounds crazy \u2013 we&#8217;ve always exploded our arrays first. He teaches us how to use the <code>reduce<\/code> operator which lets us take an entire array or dictionary and reduce it down to one thing. The <code>map<\/code> function lets us process every element in an array (or or values in a dictionary) and return a new array. Finally, <code>map_values<\/code> lets us apply a function against all of the values in a dictionary (or an array).<\/p>\n<p>It was a bitter sweet ending to the primary series on <code>jq<\/code> for Bart, but next time he&#8217;ll do the epilogue where he&#8217;ll introduce us to some rarely needed but still very useful things you can do with jq.<\/p>\n<p>You can find Bart&#8217;s fabulous tutorial shownotes at <a href=\"https:\/\/pbs.bartificer.net\/pbs166\">pbs.bartificer.net<\/a>.<\/p>\n<audio class=\"wp-audio-shortcode\" id=\"audio-31067-1\" preload=\"none\" style=\"width: 100%;\" controls=\"controls\"><source type=\"audio\/mpeg\" src=\"https:\/\/media.blubrry.com\/nosillacast\/traffic.libsyn.com\/nosillacast\/CCATP_2024_05_25.mp3?_=1\" \/><a href=\"https:\/\/media.blubrry.com\/nosillacast\/traffic.libsyn.com\/nosillacast\/CCATP_2024_05_25.mp3\">https:\/\/media.blubrry.com\/nosillacast\/traffic.libsyn.com\/nosillacast\/CCATP_2024_05_25.mp3<\/a><\/audio>\n<p><a title=\"mp3 download\" href=\"https:\/\/media.blubrry.com\/nosillacast\/traffic.libsyn.com\/nosillacast\/CCATP_2024_05_25.mp3\" target=\"_blank\" rel=\"noopener noreferrer\">mp3 download<\/a><\/p>\n<p>Read an unedited, auto-generated transcript with chapter marks:   <a href=\"https:\/\/podfeet.com\/transcripts\/CCATP_2024_05_25.html\">CCATP_2024_05_25<\/a><\/p>\n<p>Join our Slack at <a href=\"https:\/\/podfeet.com\/slack\">podfeet.com\/slack<\/a> and look for the #pbs channel, and check out our <a href=\"https:\/\/github.com\/pbs-students\" target=\"_blank\" rel=\"noopener\">pbs-student GitHub Organization<\/a>. It&#8217;s by invitation only but all you have to do is ask Allison!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this penultimate jq episode of Programming By Stealth, Bart introduces us to three new ways to process arrays and dictionaries without exploding them first. I know that sounds crazy \u2013 we&#8217;ve always exploded our arrays first. He teaches us how to use the reduce operator which lets us take an entire array or dictionary [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":18994,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[147,172,1,213],"tags":[845,6239,6120,6630,6631,6629],"class_list":["post-31067","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog-posts","category-ccatp","category-podcasts","category-programming-by-stealth","tag-arrays","tag-dictionaries","tag-jq","tag-map-function","tag-map_values-function","tag-reduce-operator"],"jetpack_featured_media_url":"https:\/\/www.podfeet.com\/blog\/wp-content\/uploads\/2019\/08\/PBS_Logo-1-300x300_no_alpha.jpg","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.podfeet.com\/blog\/wp-json\/wp\/v2\/posts\/31067","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.podfeet.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.podfeet.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.podfeet.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.podfeet.com\/blog\/wp-json\/wp\/v2\/comments?post=31067"}],"version-history":[{"count":1,"href":"https:\/\/www.podfeet.com\/blog\/wp-json\/wp\/v2\/posts\/31067\/revisions"}],"predecessor-version":[{"id":31068,"href":"https:\/\/www.podfeet.com\/blog\/wp-json\/wp\/v2\/posts\/31067\/revisions\/31068"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.podfeet.com\/blog\/wp-json\/wp\/v2\/media\/18994"}],"wp:attachment":[{"href":"https:\/\/www.podfeet.com\/blog\/wp-json\/wp\/v2\/media?parent=31067"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.podfeet.com\/blog\/wp-json\/wp\/v2\/categories?post=31067"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.podfeet.com\/blog\/wp-json\/wp\/v2\/tags?post=31067"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}