I am writing some and I need to pass a complicated data structure to some function.
The data structure goes like this:
{ '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 ways how to simplify writing such massive data structures?
PS. I made up this structure but my real structure is very similar tho.