private function listToString(element:*, index:int, arr:Array):String { var _return:String = ""; if(element is FeedInfo){ _return = element.address; }else if(element is UserFeed){ _return = element.name; }else{ _return = element.id; } return _return; } private function prepareSaveFeeds(_list:RxCollection):void{ var _tmpUserFeed:UserFeed = new UserFeed; _tmpUserFeed.feedAccount = _account; _tmpUserFeed.user = userModel.currentUser; _tmpUserFeed.keywords = _list.toArray().map(listToString).join("::"); }
The output will be
"yacobus::reinhart::blog"