I saved datas in entity of CoreData. Also I can access data in CoreData through object.value(forKey:"attribute"). But, I don't know how to access data using index.
follow code is my access way
let context = getContext()
let fetchRequest : NSFetchRequest<Entity> = Entity.fetchRequest()
let result = try? context.fetch(fetchRequest){
for object in result
object.value(forKey:"attribute")...
...
}
}
How to access data in CoreData using index of data?
resultis array and each object in array isdictionaryso basically which index you are talking about?