How do you retrieve the last element from a nested node in firebase?

Hello,

This is my node of interest:
fb_retrieval pblm
The (sub) tags are milli seconds in UTC and I noticed that they seem to be getting added at the last (the most recent instant would be the largest no. so they are being added at the last place I guess) I would like to retrieve the last instant but the below blocks give the entries in jumbled order (see textbox o/p in the screenshot) and ultimately results in random entry to be extracted!

These are the code blocks:

I tried just taking the taglist for "FEED TIME STAMP" but the o/p is still similar to the one in the screenshot!

I could just find the MAX( taglist from FEED TIME STAMP) and retrieve its value but I am hoping there'll be an elegant solution to this !!

Thanks,

That is the way to do it!

Unless you do some additional work, setup some indexes in firebase, and then use the REST API/WEB approach with the web component and webviewer to call back the tags with orderBy

What is MAX (taglist from .....) I only see a block for Max value from list, not max tag?

Use length of list blocks to get the index of the last item in a list? Or are you taglist items numbers and you want the largest number tag? If so, use the maximum list blocks.

Example:

image

image

image

image