as my last Question was marked a a duplicate i am going to rephrase it and give an example:
i want to create a list with a variable amount of packages, where each package consists of a name, 2 coordinates and some other information. I have an algorithm which sets an annotation on a map for each of those packages.
The problem i have is, that i need to write a new algorithm for each annotation. So i thought of using a for-loop which inserts the information inside of each package into the algorithm and repeats that for every single package. The problem here was so far that i would need more than one condition serving the for-loop which didnt work out for me. It is also quite difficult to adress the different parts of information inside of the packages specifically.
I hope it gets clearer now what i meant and someone has an idea how to solve the problem.