Option
public struct Option : Sendable
A struct representing an option.
Parameters
label
|
The label of the option. |
value
|
The value of the option. |
-
Declaration
Swift
public let label: String -
Declaration
Swift
public let value: String -
Initializes an
Optionstruct with the given label and value.Declaration
Swift
public init(label: String, value: String) -
Parses the input dictionary to return a list of options.
Declaration
Swift
public static func parseOptions(from input: [String : Any]) -> [Option]Parameters
inputA dictionary simulating the JSON object.
Return Value
An array of
Optionstructs.
View on GitHub