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

yaql

(Sandeep Rawat) #1

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.


(W Chan) #2

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


(Sandeep Rawat) #3

Thanks , I will try that