Key-Value Coding (KVC) with Array/Dictionary in Swift
It seems that KVC on native Swift objects is just not supported. Here's the most elegant workaround I've found:
var swiftarray: Array = []
// Fill the array with objects
var array: NSArray = (swiftarray as NSArray).valueForKeyPath("key.path") as NSArray
I've found this:
var array = swiftarray.map({$0["key.path"]! as ObjectType})
you can do the following:
let items : Array<String> = (myArray as AnyObject).valueForKeyPath("name") as! Array<String>