Created
July 5, 2025 16:45
-
-
Save mrrootsec/942e1a53e70c234f9de167c409b75747 to your computer and use it in GitHub Desktop.
JSON param key as column name
This file contains hidden or 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
| name: JSON param key as column name | |
| function: VIEW_FILTER | |
| location: PROXY_HTTP_HISTORY | |
| source: |+ | |
| /** | |
| * Extracts a JSON parameter and creates a column named after the parameter. | |
| * @author mrrootsec | |
| */ | |
| var req = requestResponse.request(); | |
| var paramName = "path"; // <-- Change as needed | |
| if (!req.hasParameters()) { | |
| return false; | |
| } | |
| if (!req.hasParameter(paramName, HttpParameterType.JSON)) { | |
| return false; | |
| } | |
| var value = req.parameterValue(paramName, HttpParameterType.JSON); | |
| if (value == null) { | |
| return false; | |
| } | |
| var result = new java.util.LinkedHashMap(); | |
| result.put(paramName, "" + value); | |
| return result; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment