Open jkschneider opened 2 years ago
JsonPathMatcher
introduced with df8d8dece8fe40253bc80c75821a836f082321d5
@jkschneider thoughts on JsonPathMatcher support for querying on labels? (didn't think it does currently)
I'm thinking something like $.provider[aws]
to match the first block below - or $.resource[foo.bar]
to match third block below.
provider "aws" {
}
provider "gcp" {
}
resource "foo" "bar" {
}
Edit - proper jsonpath syntax is probably something like $.provider[?(@.labels = 'aws']
or $.resource[?(@.labels = 'foo.bar']
- labels being a special property to query on
getAttributeValue(String)
/getAttribute(String)
onBlock
withAttributeValue(String, String)
onBlock
JsonPathMatcher
for HCLDeleteContent
by path (content includes blocks but could also include attributes)InsertContent
by pathMergeContent
Block
from anotherFindContent
(search recipe)cc / @nmck257
JsonPathMatcher
will be a more fully featured form ofgetBlockPath()
.