title: Getting the specific value in loading data from Core Data?
body: <p>I am fetching the entities from Core Data, but I can´t access the object values to assign a variable etc.</p>
  
  <p>This is my code:</p>
  
  <pre><code>    @IBAction func loadItem(sender: UIButton) {
  
      let appDel: AppDelegate = (UIApplication.sharedApplication().delegate as! AppDelegate)
      let context: NSManagedObjectContext = appDel.managedObjectContext
  
      let request = NSFetchRequest(entityName: "Words")
      request.returnsObjectsAsFaults = false
  
  
      do {
          let results:NSArray = try context.executeFetchRequest(request)
  
          for res in results{
  
              print(res)
              print(res.word)
  
          }
  
  
      } catch {
          print("Unresolved error")
          abort()
      }
  
  
  }
  </code></pre>
  
  <p>print(res) works fine and give me the object in the console:</p>
  
  <pre><code>&lt;NSManagedObject: 0x7ff0095355f0&gt; (entity: Words; id: 0xd000000000040000 &lt;x-coredata://0E645702-9493-4D1A-8D55-4482B7948054/Words/p1&gt; ; data: {
  image = &lt;89504e47 0d0a1a0a 0000000d 49484452 00000a6c 000006ec 08020000 009fcbb9 fc000001 18694343 50494343 2050726f 6669&gt;;
  word = test;
  })
  </code></pre>
  
  <p>But how can I access for instance the "word" value? It only returns this error:</p>
  
  <p>"ViewController.swift:36:23: Value of type 'Element' (aka 'AnyObject') has no member 'word'"</p>
  
  <p>I´m trying to cast "res" to be a NSManagedObject, but I can´t seem to make it work.</p>
  
  <p>Any help?</p>