Here&#x27;s the equivalent using jsonaxe[1].  The main difference is the python-like syntax, which is either good or bad depending on your tastes. The pain point about string interpolation remains, tho.<p><pre><code>    data=input.json
    
    fruits () {
        jsonaxe &#x27;models.filter(lambda x: x[&quot;title&quot;] == &quot;fruits&quot;)[0]&#x27; &quot;$data&quot;
    }
    
    farmers () {
        jsonaxe &#x27;models.filter(lambda x: x[&quot;title&quot;] == &quot;farmers&quot;)[0]&#x27; &quot;$data&quot;
    }
    
    fruit_name_key=$(fruits |
        jsonaxe --raw &#x27;fields.filter(lambda x: x[&quot;name&quot;] == &quot;Name&quot;)[0].key&#x27;)
    
    farmer_name_key=$(farmers |
        jsonaxe --raw &#x27;fields.filter(lambda x: x[&quot;name&quot;] == &quot;Full name&quot;)[0].key&#x27;)
    
    farmer_fruits_key=$(farmers |
        jsonaxe --raw &#x27;fields.filter(lambda x: x[&quot;name&quot;] == &quot;Fruits&quot;)[0].key&#x27;)
    
    farmers |
    # get bob
    jsonaxe &quot;entities.filter(lambda x: x[&#x27;$farmer_name_key&#x27;] == &#x27;Bob, the farmer&#x27;)[0]&quot; |
    # get bob&#x27;s fruits key
    jsonaxe --raw &quot;get(&#x27;$farmer_fruits_key&#x27;)&quot; |
    while read fruit_id
    do
        fruits |
        jsonaxe &quot;entities.filter(lambda x: x[&#x27;_id&#x27;] == &#x27;$fruit_id&#x27;)[0]&quot; |
        jsonaxe &quot;get(&#x27;$fruit_name_key&#x27;)&quot;
    done
</code></pre>
[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;davvid&#x2F;jsonaxe" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;davvid&#x2F;jsonaxe</a>