Getting objects from Parse into an Core Data via an Array
<p>I have a tableview that gets it's data from Parse via a queryForTable function. This works fine. I would like to get the same objects from Parse and add them to an array that I can later store in Core Data! Does anyone know how to do this? I have added my code below to show how I add it to a TableView. </p>

<p>Thanks for the help in advance. ;) </p>

<pre><code>//MARK: Query for Table with the details
    override func queryForTable() -&gt; PFQuery {

        let discoveryQuery = PFQuery(className: "DiscoveryDetails")
        discoveryQuery.cachePolicy = .NetworkElseCache
        discoveryQuery.whereKey("discoveryID", equalTo: PFObject(withoutDataWithClassName: "Discovery", objectId: "\(varInDDT!.objectId!)"))
        discoveryQuery.orderByDescending("createdAt")
        return discoveryQuery

    }
</code></pre>

<p>....</p>

<blockquote>
  <p>//I strangely cannot find the type to declare that will hold all the
  values that are shown in cellForRowAtIndexPath. PFObject does not seem
  to work either. Maybe there is something I am missing about the
  objects type that's universal to all.</p>
</blockquote>

<pre><code> var objectsArray : [String] = []

override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath, object: PFObject?) -&gt; PFTableViewCell? {

        //Discovery Items TableViewCell
        var discoveryDetailItemsCell:DiscoveryDetailTableViewCell! = tableView.dequeueReusableCellWithIdentifier("DiscoveryDetailTableViewCell") as? DiscoveryDetailTableViewCell

        if (discoveryDetailItemsCell == nil) {
            tableView.registerNib(UINib(nibName: "DiscoveryDetailTableViewCell", bundle: nil), forCellReuseIdentifier:"DiscoveryDetailTableViewCell")
            discoveryDetailItemsCell = tableView.dequeueReusableCellWithIdentifier("DiscoveryDetailTableViewCell") as? DiscoveryDetailTableViewCell
        }

        //Background Colour of the Cell

        discoveryDetailItemsCell.titleLabel.text = object?.objectForKey("exerciseName") as? String
        discoveryDetailItemsCell.titleLabel.textColor = UIColor.whiteColor()

        discoveryDetailItemsCell.durationAndSetsLabel.text = "\((object?.objectForKey("durationOrSets"))!)"
        discoveryDetailItemsCell.minAndSetLabel.text = "mins"

        discoveryDetailItemsCell.distanceAndRepsLabel.text = "\((object?.objectForKey("distanceOrReps"))!)"
        discoveryDetailItemsCell.kmAndRepsLabel.text = "km"

        discoveryDetailItemsCell.weightLabel.text = "\((object?.objectForKey("weight"))!)"
        discoveryDetailItemsCell.kgsLabel.text = ""

        discoveryDetailItemsCell.dot1.textColor = UIColor.grayColor()
        discoveryDetailItemsCell.dot2.textColor = UIColor.grayColor()

        //Load Images
        let backgroundImage = object?.objectForKey("workoutImage") as? PFFile
        discoveryDetailItemsCell.backgroundImageView.layer.masksToBounds = true
        discoveryDetailItemsCell.backgroundImageView.layer.cornerRadius =  8.0
        discoveryDetailItemsCell.backgroundImageView.image = UIImage(named: "loadingImage")
        discoveryDetailItemsCell.backgroundImageView.file = backgroundImage
        discoveryDetailItemsCell.backgroundImageView.loadInBackground()

       //My Attempt at adding one of the values into an array
       objectsArray  = [(object?.objectForKey("exerciseName"))! as! String]

        return discoveryDetailItemsCell
    }
</code></pre>