Skip to content

Clarification on toStateData merging into a nested object field #694

Closed Answered by cdavernas
giorgosera asked this question in Q&A
Discussion options

You must be logged in to vote

Is it correct to use toStateData with a nested object like the above?

@giorgosera if your expression language allows it, it's perfectly correct to use such filter. JQ allows that out of the box AFAIK, so you're good there.

PS: The example I am referring to might have an error. This is the example here. The toStateData looks like this: ".counts.current". I guess the correct one would be ${ .counts.current }?

It's not an error. The spec mandates using the $ and mustaches prefix/suffix only in non-native runtime expression values. It should imo enforce it everywhere, though.

Anyways, back to the sample: the toStateData property is a runtime expression, therefore the format does not forci…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@giorgosera
Comment options

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