[Cialug] JSON Querying

Todd Walton tdwalton at gmail.com
Thu Jun 14 14:39:32 UTC 2018


On Thu, Jun 14, 2018 at 10:06 AM, Adam Shannon <adamkshannon at gmail.com>
wrote:

> Does this work for you?
>
> $ jq .Reservations[].Instances[] /tmp/aws.json | jq 'select(
> .BlockDeviceMappings | length <= 2)'
>

Yes! I combined into one line: '.Reservations[].Instances[] | select(
.BlockDeviceMappings | length <= 2) | .InstanceId'. But yes! I was making
that too hard. Thank you, Adam.

--
Todd


More information about the Cialug mailing list