^[89][0-9]{7}$
.*
Struggling with this data all day. I'm fairly new to jmes and thinking I'm missing something fundamental here that I hope you may assist with
{
"imdata": [
{
"l1PhyIf": {
"attributes": {
"dn": "pod-1/130/eth1-30"
"adminSt": "enabled"
},
"children": [
{
"ethpmPhysIf": {
"attributes": {
"allowedVlans": "10"
}
}
}
]
}
}
]
}
Trying to group values from children as another k,v pair with data from attributes without it being in another sublist. end result would look like
"switch_name": "pod-1/130/eth1-30"
"status": "enabled"
"vlans": "10"
Hi, how do i select by different key?
aws ec2 describe-instances --instance-id "$INSTANCE_ID" \
--query 'Reservations[0].Instances[0].BlockDeviceMappings[?(DeviceName==`/dev/sda1`)]'
[
{
"DeviceName": "/dev/sda1",
"Ebs": {
"AttachTime": "2020-11-09T10:53:07+00:00",
"DeleteOnTermination": true,
"Status": "attached",
"VolumeId": "vol-023ddef3ee401aa47"
}
}
]
But i want it to be DeviceName==Reservations[0].Instances[0].RootDeviceName]
... wrong syntax?
I have this JSON
{
"containers":
[
{
"Labels": {
"com.docker.compose.service": "test1",
"version": "4.10.7"
}
},
{
"Labels": {
"com.docker.compose.service": "test2"
}
}
]
}
and i'm using this filter containers[].Labels."com.docker.compose.service"
which works fine. but i want to get only the items that contain Lables.version
containers[].Labels[?version]."com.docker.compose.service"