I'm trying to make a simple filtering script using AWS cli + jq (powershell or cmd in Windows).
aws iam list-roles | jq -c '.Roles[].RoleName | select(startswith ("blabla"))'
But getting this error:
jq: error: AD_/0 is not defined at <top-level>, line 1:
.Roles[].RoleName | select(startswith (AD_))
jq: 1 compile error
But using jqplay.org with same JSON everything works well. Any thoughts?
thanks!
aws iam list-roles | jq -c '.Roles[].RoleName | select(startswith ("blabla"))'
blabla_rolename_1