The order of sections in a JSON template can be determined simply by the order of properties in the sections attribute’s value. So, I’m pretty confused about the purpose the order attribute.
Furthermore, when you reorder sections in a JSON template using the theme editor, the order of the entries in the sections attribute are changed to reflect the order of the sections in the theme editor. Hence, it seems like the order attribute is completely redundant, since the order of sections can simply be determined by looking at the order of sections in the sections attribute.
So I’m pretty confused about why JSON templates are designed this way. That is, why wasn’t the sections attribute designed to be an array, instead of an object?
In other words, is there ever a useful case for when the order of sections that appear on the order attribute is different than the order of sections that appear on the sections attribute? Because it seems like this would be the only scenario where the current design makes sense. Am I missing something here?