I mean, data is structured however is sensible in the context, there isn’t a special way it’s done, there isn’t a beginner example level of data structure and then an IRL level of data structure.
If this data structure was used in a real life context where it made sense then it would be a real implementation
You normally store these kind of things in a database, then when you need the data out and usable in JS code you query for it in your code and depending how thing are set up out pops something like this
Having seen a bit of real life data and how people store it, id say the example used here could be seen as simplified. The names are very intuitive and informative, the object nesting is not that deep and the values are not too complex. In real life, very often, you can encounter situations when data is structured in not very practical way, some variable names make no sense, or dont carry enough context and carry some business logic which can be very far from the developer. Especially when we talk about exchanging bigger data in api interactions, you can see some very deep nested objects.
I find the particular challenge example to be very fitting in describing how such nested objects can look in real life and its good exercise to see how you can access values from within. Keep in mind, in a normal project, where people made thigns consistent, you wont see stuff like myObj.someArr.checkSmh['data'].callFunc, even if the object you work with is that deep, accessing deeper levels would usually happen on several layers(you are likely to pass the object between several callbacks/sources, each time going a level or two deeper). Hope that makes sense
Its true, when many people work on the same project, even when there are some set of rules and good practices, it still leaves space to how experienced a developer is, or his own personal preference and way of writing code. Ive already seen situations, when we ran out of good/descriptive names of variables, or you see something was just worked enough to work at the moment, but not structured well enough to be built on, yet you can be on a stage when you arenot confident and able enough to actually refactor it and implement a universal solution, so you built on top of it and it gets more complicated then it should be.
You are right, working with complex data objects can be scary at first, but once you get the hang of the basics, the scale dont matter that much and you will pretty much be able to deal with any set of data, it all comes to practice. All it takes is to know how to access a particular element of an array, or object data, then you can go deep as much as you need