NodeJS Plugin Runtime (#53)

This commit is contained in:
Gregory Schier
2024-07-19 10:41:47 -07:00
committed by GitHub
parent 7e5408fc92
commit 102bd588c2
106 changed files with 5246 additions and 21337 deletions

View File

@@ -1,12 +0,0 @@
import jp from 'jsonpath';
export function pluginHookResponseFilter(ctx, filter, text) {
let parsed;
try {
parsed = JSON.parse(text);
} catch (e) {
return;
}
const filtered = jp.query(parsed, filter);
return { filtered: JSON.stringify(filtered, null, 2) };
}