mirror of
https://github.com/adnanh/webhook.git
synced 2025-07-27 21:10:29 +00:00
Add support for top-level JSON array in payload
Detect if leading character in JSON payload is an array bracket. If found, decode payload into an interface{} and then save the results into payload["root"]. References to payload values would need to reference the leading, "virtual" root node (i.e. "root.0.name"). Fixes #215
This commit is contained in:
parent
f692da2465
commit
0e90ccb441
5 changed files with 127 additions and 5 deletions
|
@ -168,6 +168,22 @@
|
|||
],
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "sendgrid",
|
||||
"execute-command": "{{ .Hookecho }}",
|
||||
"command-working-directory": "/",
|
||||
"response-message": "success",
|
||||
"trigger-rule": {
|
||||
"match": {
|
||||
"type": "value",
|
||||
"parameter": {
|
||||
"source": "payload",
|
||||
"name": "root.0.event"
|
||||
},
|
||||
"value": "processed"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "plex",
|
||||
"execute-command": "{{ .Hookecho }}",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue