Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assign sub object of event as prop in agent options? #3419

Open
Bootta11 opened this issue Jun 6, 2024 · 2 comments
Open

Assign sub object of event as prop in agent options? #3419

Bootta11 opened this issue Jun 6, 2024 · 2 comments

Comments

@Bootta11
Copy link

Bootta11 commented Jun 6, 2024

Hi,

Is there way to assign sub object of event to options prop? For example:
// event
{
"eventSubObj": {
"key1": "value1"
}
}

// PostAgent options
{
"url": "http://www.somesite.com/url",
...
"payload": { eventSubObj }
...
}

// so that options translates to

{
"url": "http://www.somesite.com/url",
...
"payload": {
"key1": "value1"
}
...
}

@knu
Copy link
Member

knu commented Jun 7, 2024

You could say "payload": "{{ eventSubObj | as_object }}", I guess.

@Bootta11
Copy link
Author

Bootta11 commented Jun 7, 2024

Its not working, i got error: " if provided, payload must be a hash or an array".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants