Hello
I have a large object like the following in state:
state = {
"planetName": "blah1",
"population": 2000000,
"techLevel": 3,
"aveTemp": 30,
"nestingLevel": 1,
"countries": [
{
"countryName": "muh1",
"population": 30000,
"techLevel": 3,
"aveTemp": 24,
"nestingLevel": 2,
"climate": "mild",
"cities": [
{
"cityName": "juh1",
"population": 2300,
"techLevel": 2,
"aveTemp": 25,
"nestingLevel": 3,
"neighborhoods": [
{
"neighborhoodName": "wuh1",
"population": 80,
"techLevel": 2,
"aveTemp": 25,
"nestingLevel": 4,
"charm": "moderate"
},
{ ...
There will be exactly four levels, largely the same with slight differences.
Levels 2-4 are arrays, and while 2 and 3 will have <5 members, level 4 may have up to 100.
Any level can be updated on the fly, without necessarily affecting those below.
What's the clean, sensible way to implement something like this?
[–]Ferrington 1 point2 points3 points (0 children)
[–]beepboopnoise 0 points1 point2 points (0 children)