Skip to content

Instantly share code, notes, and snippets.

@ob1-sc
Created July 17, 2018 15:12
Show Gist options
  • Save ob1-sc/628022df3f3cd5a1baba36170cd898fc to your computer and use it in GitHub Desktop.
Save ob1-sc/628022df3f3cd5a1baba36170cd898fc to your computer and use it in GitHub Desktop.
Extract named plan from tile properties
PLANS_PROPERTY=".properties.rds_postgres_plans"
PLAN_NAME=".properties.rds_postgres_plans"
jq --arg plans_property "$PLANS_PROPERTY" --arg plan_name "$PLAN_NAME" '.properties | to_entries[] | select(.key == $plans_property) | .value.value[] | select(.name.value == $plan_name)'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment