Skip to content

Instantly share code, notes, and snippets.

@mastermind247
mastermind247 / Test.swift
Created May 24, 2018 07:09
Iterate through structures and print all properties
import UIKit
import Foundation
protocol Printable {
func getAllProperties() -> [String: Any]?
}
extension Printable {
func getAllProperties() -> [String: Any]? {
var result: [String: Any] = [:]