Permalink
1 comment
on commit
sign in to comment.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Add json-prune.js scriptlet
The scriptlet will trap calls to JSON.parse, and if the result of the parsing is an Object, it will remove specified properties from the result before returning to the caller. Usage: ##+js(json-prune, arg1, [arg2]) Where: - arg1: a list of space-separated properties to remove - arg2: optional, a list of space-separated properties which must be all present for the pruning to occur Example: ##+js(json-prune, enabled, adpath config) A property in a list of properties can be a chain of properties, example: adpath.url.first
- Loading branch information
Showing
1 changed file
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2fd86a6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Forgot to mention that
+js(json-prune)
(no arguments) will log the current hostname + json payload at the console.