I saved the data like an image in firebase. And I try to load the saved data into the textbox one after another. However, the order of the fetched data is not listed in order. I'm curious as to why this is, and I want to know how to solve it.
(The displayed part is a list of firebase tags and listed in order. I have confirmed that the order is not correct here.)
You didn't show the blocks for how you received the data and how you presented it.
However, let me point out a feature of JSON that is relevant to this problem.
There is no guarantee for the order of tags and values in a JSON Object.
We know this is a JSON Object because it has pairs of the form tag:value, in this case the tags are "01", "02",...
If you insist in reading substructures in numerical tag order, start counting from 1 upwards, and pad with 0 as needed to generate your two character tags.
Firebase does not necessarily sort as you might expect and neither does json when returning the tag list. You will need to sort the taglist and call back the tag values in the sorted order.
Though this should be fixed upstream, where the data is added to FireBase, here is code to sort a dictionary by the numeric order of its keys, and present it as a list: ESOFS_Manager_V2_ABG.aia (18.0 KB)