title: Return value for function inside a block
body: <p>I am using AFNetworking to get data from a server:</p>
  
  <pre><code>-(NSArray)some function {
      AFJSONRequestOperation *operation = [AFJSONRequestOperation JSONRequestOperationWithRequest:request
          success: ^(NSURLRequest *request, NSHTTPURLResponse *response, id JSON) {
              NSArray *jsonArray =[JSON valueForKey:@"posts"];
          }
          failure:^(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, id JSON) {}
  }
  </code></pre>
  
  <p>So what I am trying to do here is to return the jsonArray to the function. Obviously return is not working.</p>