<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>json on bascht.com</title><link>https://bascht.com/tags/json/</link><description>Recent content in json on bascht.com</description><generator>Hugo -- gohugo.io</generator><language>de-de</language><lastBuildDate>Fri, 18 Nov 2022 20:14:45 +0100</lastBuildDate><atom:link href="https://bascht.com/tags/json/index.xml" rel="self" type="application/rss+xml"/><item><title>Collect Objects into an array with jq</title><link>https://bascht.com/tech/2022/11/18/collect-objects-into-an-array-with-jq/</link><pubDate>Fri, 18 Nov 2022 20:14:45 +0100</pubDate><guid>https://bascht.com/tech/2022/11/18/collect-objects-into-an-array-with-jq/</guid><description>Say you&amp;#39;re iterating over a list of objects in jq:
[ {&amp;#34;foo&amp;#34;: &amp;#34;bar&amp;#34;, &amp;#34;other&amp;#34;: &amp;#34;attributes&amp;#34;}, {&amp;#34;foo&amp;#34;: &amp;#34;baz&amp;#34;, &amp;#34;should&amp;#34;: &amp;#34;be filtered&amp;#34;} ] and you are only interested in operating on the attribute foo:
jq &amp;#34;.[].foo&amp;#34; will not give you two distinct objects:
&amp;#34;bar&amp;#34; &amp;#34;baz&amp;#34; but not a new list. So whatever you do, the next pipeline will operate on each single object. For example jq &amp;#34;.</description></item><item><title>nullMastering JQ: Part 1 - CodeFaster</title><link>https://bascht.com/posts/2020/07/20/nullmastering-jq-part-1-codefaster/</link><pubDate>Mon, 20 Jul 2020 09:34:34 +0000</pubDate><guid>https://bascht.com/posts/2020/07/20/nullmastering-jq-part-1-codefaster/</guid><description/></item></channel></rss>