Skip to content

How to handle Action data filter #600

Closed Answered by tsurdilo
VicNgu asked this question in Q&A
Discussion options

You must be logged in to vote

@cdavernas @VicNgu
It's pretty hard for spec to define this rule correctly since we do not control the result type.
If you have ideas like how to do this, like set unique id of action/event def and use that as a key, or something else, i am all ears.

For now what is expected is that user understands the result and can use jq to manipulate it, so for your example if result is
{
"breads": ["baguette", "brioche", "rye"],
"pasta": [ "penne", "spaghetti", "ravioli"]
}
then you can use jq:

"results": "${ {"thingstobuy": [.breads[0], .pasta[1] ] } }",

in which case toStateData can still be optional

....jq is pretty magic hehe

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
2 replies
@VicNgu
Comment options

@cdavernas
Comment options

Comment options

You must be logged in to vote
4 replies
@VicNgu
Comment options

@ricardozanini
Comment options

@VicNgu
Comment options

@ricardozanini
Comment options

Answer selected by VicNgu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants