How to convert string with pipes | | into dictionary
I have a string with many pipes I want to convert them into dictionary [String:Any] how can I do that ? Example let input = “boolFirst=false|onProject=Active|passed=false” Into –> let output = [String: Any] = [boolFirst: false, onProject: “Active”, passed: false] so far tried with components(separatedBy: “|”) & components(separatedBy: “=”) Is there any cleaner way to … Read more