     }
 
     public func getTarget(_ targetName: String) -> Target? {
-        return targets.first { $0.name == targetName }
+        return targetsMap[targetName]
     }
 
     public func getConfig(_ configName: String) -> Config? {

        } else {
            options = SpecOptions()
        }
    }

    static func filterJSON(jsonDictionary: JSONDictionary) throws -> JSONDictionary {

        self.basePath = basePath
        self.name = name
        self.targets = targets
        self.targetsMap = Dictionary(uniqueKeysWithValues: self.targets.map { ($0.name, $0) })
        self.configs = configs
        self.settings = settings
        self.settingGroups = settingGroups
