Create a new list. Compare the third element of each item with "ZONAL 1" and, if it matches, then insert the first element of the same item in the new list.
I don't understand...you have filtered the elemts into the spinner by zonal1 so, all the elements in spinner are zonal 1...what do you want to do? Which data do you have now in the spinner?
well, that is not automatic...you have to go through the entire list of tags and check element by element which one contains the string you are looking for, and stay with that tag. If only one tag can contains one name, you can stop searching once you have found it. Something like this:
If you see what I shared before, that part you are marking was in a very specific block "GotValue" which received the data from a specific tag.
As you can see, first it was calling to GetTagList to get all the tags, then, for each tag it is calling to GetValue and finally, in GotValue block is receiving the data of each tag.
In that block is where you are receiving the data from your tag and is where you can compare...but you need to get the data associated to the tags first.
Or if you already have a list with the data recovered from firebase you can search directly in it.
Of course, because you have "misplaced" the list...
Before that change, you had two paired lists: names and zones so, if you chose element 1 from the list of names, from its index, you could obtain the element of its pair from the list of zones, but once you have sorted one of the lists this no longer works.
Solution, you can order both lists equally, or you search in the original list where you had everything together (name, number, area, route) which element contains the selected name.
The extra empty element in the spinner is not a problem, because you always can subtract one to the index,