title: Importing data using Swift 3
body: <p>I try to import data from JSON array like this :</p>
  
  <pre><code>let json = JSON(value)
  let data: [[String: Any]] = self.transformJson(json)
  MagicalRecord.saveInBackground({ (localContext) in
      User.mr_import(from: data, in: localContext)
  })
  </code></pre>
  
  <p>The problem is the mr_import swift method call  <code>MR_importFromObject:inContext:</code> instead of <code>MR_importFromArray:inContext:</code></p>
  
  <p>Here's the exception : </p>
  
  <blockquote>
    <p><strong>* Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[&lt;_SwiftValue 0x6080000c9e60> valueForUndefinedKey:]: this
    class is not key value coding-compliant for the key id.'
    *</strong> First throw call stack: (     0   CoreFoundation                      0x0000000109ae4d4b <strong>exceptionPreprocess + 171  1   libobjc.A.dylib<br>
    0x000000010cf4a21e objc_exception_throw + 48  2   CoreFoundation<br>
    0x0000000109ae4c99 -[NSException raise] + 9   3   Foundation<br>
    0x000000010cb247c5 -[NSObject(NSKeyValueCoding) valueForUndefinedKey:]
    + 226     4   Foundation                          0x000000010ca5060b -[NSObject(NSKeyValueCoding) valueForKey:] + 283     5   Foundation                          0x000000010ca53eec -[NSArray(NSKeyValueCoding) valueForKey:] + 467  6 
    Foundation                          0x000000010ca503e8
    -[NSArray(NSKeyValueCoding) valueForKeyPath:] + 448   7   MagicalRecord                       0x000000010a968ce8 -[NSObject(MagicalRecord_DataImport)
    MR_lookupKeyForAttribute:] + 232  8   MagicalRecord<br>
    0x000000010a968efe -[NSObject(MagicalRecord_DataImport)
    MR_valueForAttribute:] + 62   9   MagicalRecord<br>
    0x000000010a95b7c7 __75+[NSManagedObject(MagicalRecord_DataImport)
    MR_importFromObject:inContext:]_block_invoke + 135    10  CoreData<br>
    0x000000010d4519a7
    developerSubmittedBlockToNSManagedObjectContextPerform + 199  11 
    CoreData                            0x000000010d45185f
    -[NSManagedObjectContext performBlockAndWait:] + 255  12  MagicalRecord                       0x000000010a95b5db
    +[NSManagedObject(MagicalRecord_DataImport) MR_importFromObject:inContext:] + 331     13  Kairos<br>
    0x0000000108e057ce
    _TFFZFV6Kairos8DataSync10fetchUsersFFOS_13StatusRequestT_T_U_FGV9Alamofire12DataResponseP__T_U_FCSo22NSManagedObjectContextT_
    + 158     14  Kairos                              0x0000000108dc9ecc _TTRXFo_oCSo22NSManagedObjectContext__XFdCb_dS_</strong> + 60   15  MagicalRecord                       0x000000010a953671
    __73+[MagicalRecord(ActionsDeprecated) saveInBackgroundWithBlock:completion:]_block_invoke + 129  16 
    CoreData                            0x000000010d4519a7
    developerSubmittedBlockToNSManagedObjectContextPerform + 199  17 
    libdispatch.dylib                   0x000000010e9740cd
    _dispatch_client_callout + 8  18  libdispatch.dylib                   0x000000010e951e17 _dispatch_queue_serial_drain + 236   19 
    libdispatch.dylib                   0x000000010e952b4b
    _dispatch_queue_invoke + 1073     20  libdispatch.dylib                   0x000000010e95302b _dispatch_queue_override_invoke + 683    21 
    libdispatch.dylib                   0x000000010e955385
    _dispatch_root_queue_drain + 720  22  libdispatch.dylib                   0x000000010e955059 _dispatch_worker_thread3 + 123   23 
    libsystem_pthread.dylib             0x000000010ed23712
    _pthread_wqthread + 1299  24  libsystem_pthread.dylib             0x000000010ed231ed start_wqthread + 13 ) libc++abi.dylib: terminating
    with uncaught exception of type NSException</p>
  </blockquote>