Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Jefajers authored Apr 17, 2024
1 parent 67d224d commit 7f81411
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
del(.ResourceId, .id, .tenantId, .subscriptionId, .properties.policyType, .properties.metadata.createdOn, .properties.metadata.updatedOn, .properties.metadata.createdBy, .properties.metadata.updatedBy)
| walk(if type == "object" then with_entries(if .key == "equals" or .key == "notEquals" or .key == "like" or .key == "notLike" or .key == "match" or .key == "matchInsensitively" or .key == "notMatch" or .key == "notMatchInsensitively" or .key == "contains" or .key == "notContains" or .key == "in" or .key == "notIn" or .key == "containsKey" or .key == "notContainsKey" or .key == "less" or .key == "lessOrEquals" or .key == "greater" or .key == "greaterOrEquals" or .key == "exists" then . else select(.value != "") end) else . end)
| walk(if type == "object" then with_entries(
if .key == "equals" or .key == "notEquals" or .key == "like" or .key == "notLike" or .key == "match" or .key == "matchInsensitively" or .key == "notMatch" or .key == "notMatchInsensitively" or .key == "contains" or .key == "notContains" or .key == "in" or .key == "notIn" or .key == "containsKey" or .key == "notContainsKey" or .key == "less" or .key == "lessOrEquals" or .key == "greater" or .key == "greaterOrEquals" or .key == "exists"
then .
else select(.value != "" or (.key == "defaultValue" and .value == ""))
end
)
else . end)
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
del(.ResourceId, .id, .tenantId, .subscriptionId, .properties.policyType, .properties.policyDefinitions[].definitionVersion, .properties.metadata.createdOn, .properties.metadata.updatedOn, .properties.metadata.createdBy, .properties.metadata.updatedBy)
| del(.. | select(. == ""))
| walk(if type == "object" then with_entries(
select(.value != "" or (.key == "defaultValue" and .value == "")))
else . end)

0 comments on commit 7f81411

Please sign in to comment.