title: Retriev variable values in javascript function
body: <p>I am using facebook API for my project and getting some data in following manner in var <code>mydata</code> </p>
  
  <pre><code>if (response.status === "connected")
          {
              LodingAnimate(); //Animate login
              FB.api('/me?fields=movies,email', function(mydata) { //--
              console.log(mydata);
                if(data.email == null)
                {
                   alert("You must allow us to access your email id!");
                   ResetAnimate();
               }
     }
  </code></pre>
  
  <p>I dont have any issue with this code. But I want to send this data using ajax call to process and insert into database. </p>
  
  <p>My ajax call:</p>
  
  <pre><code>function AjaxResponse()
   {
      var send=document.ge(mydata)      **//Here I want to fetch mydata from previous code**
      var datas = document.elements['id'].value;
      var s = 'connect=1'; 
       $.ajax({
      type: "POST",
      url: "process_facebook.php",
      data: s,send                   **//Is this correct way to send s and send togather? I have tried with only 's' which works fine but dont know about both togather**
      }).done(function(result) {
      $("#fb-root").html(result);
      });
     }
  </code></pre>
  
  <p>Can someone please assist how to fetch mydata in javascript function and review the code.</p>