Hi
I am trying to itterate in an array of Text using the below function, but I receive an error. Not sure what I am doing wrong:
func addVideo2Album_(albums : ?[Text], videoId : VideoId) : ?() {
do ? {
switch(albums) {
case null {
null!
};
case (?_) {
for (alb in albums.vals()){
};
()
};
};
}
};
it gives me this error refering the line for (…):
Expected object type but expression produced type ?[Text]