title: Calling javascript functions using javascriptcore framework returns [object Object] to JSValue
body: <p>Code in <code>.js</code> file:</p>
  
  <pre><code>var fact = function(x){
      return WeatherWebService(x);
  }   
  </code></pre>
  
  <p>objective-c native methods:</p>
  
  <pre><code> - (IBAction)btnOkClicked:(id)sender 
      {
          [self.aJSEngine loadJSLibrary:@"script"];    
      }
  
      - (void)loadJSLibrary:(NSString*)libraryName
      {
          NSString *library = [NSString stringWithContentsOfFile:[[NSBundle mainBundle] pathForResource:libraryName ofType:@"js"]  encoding:NSUTF8StringEncoding error:nil];
  
          NSLog(@"[JSC] loading library %@...", libraryName);
          [self runJS:library];
      }
  
      - (void)runJS:(NSString *)aJSString
      {
          if (!aJSString) {
              NSLog(@"[JSC] JS String is empty!");
          }
          else{
              JSContext *context = [[JSContext alloc]initWithVirtualMachine:[[JSVirtualMachine alloc]init]];
              context[@"WeatherWebService"] = ^(int x){
                  NSDictionary *dict = [self callingWeatherFromJavascript];
                  return dict;
              };
  
              [context evaluateScript:aJSString];
              JSValue *val = context[@"fact"];
              JSValue *finalResult = [val callWithArguments:@[context[@"3"]]];
  
          }
      }
  
      -(NSDictionary*)callingWeatherFromJavascript{
              NSString *urlString =  @"http://api.openweathermap.org/data/2.5/weather?q=London,uk";
              NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:urlString]];
              __block BOOL complete = NO;
              AFHTTPRequestOperation *operation = [[AFHTTPRequestOperation alloc] initWithRequest:request];
              operation.responseSerializer = [AFJSONResponseSerializer serializer];
  
              [operation setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject) {
  
                  // 3
                  self.dictionary = (NSDictionary *)responseObject;
                  complete=YES;
                  // NSDictionary *dict = [self.dictionary objectForKey:@"main"];
                  //            if ([self.delegate respondsToSelector:@selector(returnDataFromResponse:)]) {
                  //                [self.delegate returnDataFromResponse:dict];
                  //            }
  
              } failure:^(AFHTTPRequestOperation *operation, NSError *error) {
  
                  // 4
                  UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Error Retrieving Weather"
                                                                      message:[error localizedDescription]
                                                                     delegate:nil
                                                            cancelButtonTitle:@"Ok"
                                                            otherButtonTitles:nil];
                  complete=NO;
                  [alertView show];
              }];
  
  
              // 5
              [operation start];
          while(complete == NO) {
              [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
          }
          return self.dictionary;
      }
  </code></pre>
  
  <p>In the above code, the  method <code>'callingWeatherFromJavascript'</code> returns <code>NSDictionary</code>. When i receive this value in "JSValue" in function <code>'-(void)runJS'</code> it returns <code>[object Object]</code>.  Is there any way of converting this back into <code>NSDictionary</code>?</p>