I am writing some, and I need to pass a complex data structure for some function.
The data structure is as follows:
{ 'animals': [ 'cows', 'moose', { 'properties': [ 9, 26 ] } ] 'fruits': { 'land': [ 'strawberries', 'other berries' ], 'space': [ 'apples', 'cherries' ] } }
This structure looks pretty ugly to me. Can you think of a way to simplify writing such massive data structures?
PS. I made up this structure, but my real structure is very similar to that.
source share