Skip to content

Instantly share code, notes, and snippets.

@markst
Created February 21, 2017 03:55
Show Gist options
  • Save markst/cb6b90453fd72c76c2e601f3da936d1b to your computer and use it in GitHub Desktop.
Save markst/cb6b90453fd72c76c2e601f3da936d1b to your computer and use it in GitHub Desktop.
var skillIds: [String]
skillIds = selectedJobCategories.reduce([], { (results, jobCategory) -> [String] in
var results = results
results.append(contentsOf: jobCategory.skills!.linkage!.reduce([], { (results, resourceIdentifier) -> [String] in
var results = results
results.append(resourceIdentifier.id)
return results
}))
return results
})
SpineSingleton.find(skillIds, ofType: Skill.self).onSuccess { [weak self] in
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment