@OOPer everything works fine now. Thank you for this.
For your comment `statusList.append(status) //<- Why this is needed?
this is the status that I receive from the server. It is usually the same Yes, no , NA but sometimes it may be different and I need to show it on the picker. Once it is appended in the list, i then run a separate method which removes the similar items from the list(if there are any).
Picker("Status", selection: currentStatus ) { ForEach(GeneralMethods().uniqueElementsFrom(array: statusList), id: \.self){ status in Text(status) } }