This site is in read only mode. Please continue to browse, but replying, likes, and other actions are disabled for now.

⚠️ We've moved!

Hi there!

To reduce project dependency on 3rd party paid services the StackStorm TSC has decided to move the Q/A from this forum to Github Discussions. This will make user experience better integrated with the native Github flow, as well as the questions closer to the community where they can provide answers.

Use 🔗 Github Discussions to ask your questions.

How to convert list of dict to dict of dict using yaql syntax

I have some results back from another subtask called using “with items” which basically return a list containing results of each item.
Output back to main workflow is like below:

[{u'Test1': u'starting sub workflow Test1'}, {u'Test2': u'starting sub workflow Test2'}]

I prefer to have it converted to:
{'Test1': 'starting sub workflow Test1', 'Test2': 'starting sub workflow Test2'}

Can anyone help?, not able to figure out right syntax.

Did you know there’s an online tool to easily test YAQL expression at http://yaqluator.com? Have you given that a try?

1 Like

Thanks , I will try that

I’ve been struggling with this same basic issue as well, how to convert a list to a dict with YAQL. Has anyone figured this out?