Creating a dictionary in the function stack

๐Ÿ‘‹ Hello. First post here. I'm not totally sure if this belongs to the Transforming Data space or not so I'm posting it here just in case.

How would I go about creating a `{'foo': 'bar'}` object in a function stack? I tried a few different things but I haven't been successful yet.

My long term plan is to have an endpoint return something like the following dictionary with static data (`foo` and `bar`) to test out things on the frontend.
{
'foo1': 'bar1',
'foo2': ['bar21', 'bar22', 'bar23'],
'foo3': {
'foo31': 'bar31',
'foo32': 'bar32',
'foo33': 'bar33'
},
'foo4': [
{'foo41': 'bar41'},
{'foo42': 'bar42'},
{'foo43': 'bar43'}
],
'foo5': 'bar5'
}Thank you. ๐Ÿ™
Other
3 replies