I want to be able to convert a String into a variable name and then use it to call a variable in another Swift file.
//ViewController.swift
var hireTypes = [\"sc
A better option is to use the string as a key into a dictionary to get the values.
E.g.
static var dataDictionary = [
"school" : [
"name": "School",
"warningMessageOne": "Please check system value",
"warningMessageThree": "May or June",
"warningMessageTwo": "Check hire fits in with morning and afternoon school runs"
],
"council" : [
"name": "Council",
"warningMessageOne": "Please check system value",
"warningMessageThree": "Aug or June",
"warningMessageTwo": "Check hire fits in with morning and afternoon school runs"
],
.....
]
Then access the data as
var data = FullData.dataDictionary[variableName]