Load firebase data sequentially

image !

!

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.

Expect an anomaly when you pass 99, too.

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.

!
I tried to solve the json problem using web component. But it didn't work.
How should the blocks be constructed?

Export your .aia file and upload it here.

Use Tim's advice and Sajal's Bubble Sort to sort the Tags in order ( shown in green ) might be helpful.

Sajal BubbleSort

ESOFS_Manager_V2 (1).aia (9.0 KB)

The block's status so far is as follows. aia file is attached. :울음 소리:

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)



I had to use a custom sort procedure for this:
sorted_keys

Note that the output of the dict to list conversion is a list of text JSON-like records, that need further individual conversion.

I also threw in my Tidy procedure, for indented description of complex dictionaries.