Question: I want to list the VPC id's which have a particular tag (Name=MyVPC). 

I am aware that I can use `--filter` and run:

```
aws ec2 describe-vpcs --filters Name=tag:Name,Values=MyVPC --query 'Vpcs[].VpcId'

```

This works completely fine. 

Is there a way I can achieve this without using `--filter` and only use JMESPath?

Answer: 
```
aws ec2 describe-vpcs --query 'Vpcs[?Tags[?Key==`Name`]|[?Value==`MyVPC`]].VpcId' --output text

```
Try this command:

```
aws ec2 describe-vpcs --query 'Vpcs[?contains(Tags[?Key==`Name`].Value[], `MyVPC`) == `true`].[VpcId]' --output text

```