function is returning before the API service is being called iOS : <p>I am trying to return the "cardsarray" which contain the name, designation, and 4 more fields. When API is being called it returns the array of object which gets stored into my array. </p>

<p>But when I run the application doesn't show anything in the table view.</p>

<p>I tried some print statement. It came out that the function is returning before the API is being called. Not able to understand why. Please help</p>

<p><a href="https://i.stack.imgur.com/Cpv6q.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Cpv6q.png" alt="enter image description here"></a></p>

<pre><code> {
    designation = "Manager";
    email = "Sample@gmail.com";
    mobile =1234567899;
    name = "Sample";
    status = 0;
    Company = "ABC Corp"

},
    {
    "pending_staff_pic" = 1;
}
</code></pre>
