average(ofProperty:)

public func average<T: AddableType>(ofProperty property: String) -> T?

Returns the average value of a given property over all the results, or nil if the results are empty.

Warning

Only the name of a property whose type conforms to the AddableType protocol can be specified.