Listable

public protocol Listable

Listable protocol

Need for making Array of ModelProtocol

  • getList(_:) Extension method

    Converting Array<[String:Any]> to Array<ModelProtocol>

    Declaration

    Swift

    public static func getList(_ array: ArrayOfDictionaries) -> Array<Self>

    Parameters

    array

    array of dictionaries

    Return Value

    array of models