How to deserialize data from NSArray
<p>This is what I mean.</p>

<p>I have a Post entity in my project with Core Data included.</p>

<p>I make a Fetch request and get data successfully. Then I want to deserialize data to the regular type of my entity Post.</p>

<p>Then I commented the code I want to work. I want to get separate values.</p>

<pre><code>        do {
          let result: NSArray = try context.executeFetchRequest(request)
             if (result.count &gt; 0){ 
                for res in result {
                    print("line 83: \(res as! Post)")
                     let resInfered = (res as! Post)
                    //let pd = PhotoData(userId: resInfered.userId, photoUrl: "", likes: resInfered.likes, title: resInfered.title,userName: resInfered.userName)
                }
            }
        } catch let error{
            print("read error \(error)")
        } 
</code></pre>

<p>Below is the print of the line 83:</p>

<p>line 83:  (entity: Post; id: 0x1455a7e0  ; data: {
    date = nil;
    likes = 50;
    photoUrl = "";
    title = Leo;
    userId = 15;
    userName = Leo;
})</p>

<p>It has the type of  Selfiegram.Post, though I don't know how to get  values of likes and userID and stuff from that.</p>