//
//  MVPD+Extensions.swift
//  AdobeAccessEnablerQB
//
//  Created by brel on 3/24/20.
//

import AccessEnabler
import Foundation

extension MVPD {
    func toJSON() -> [String: String] {
        ["id": id ?? "",
         "title": displayName ?? "",
         "logoURL": logoURL ?? ""]
    }
}

extension Array where Element: MVPD {
    func toJSONObjects() -> [[String: String]] {
        compactMap { $0.toJSON() }
    }
}
