title: how to handle result of graph api to get list of user's groups in Javascript SDK
body: <p>In my facebook app. I need to get a list of user's group. But Problem is I am not good in JavaScript so unable to handle result. Using graph api I am able to get name of user by using </p>
  
  <pre><code>response.name
  </code></pre>
  
  <p>but in group list, it looks different. Script I used to get group List </p>
  
  <pre><code>FB.api(
  "/me/groups",
  function (response) {
  if (response &amp;&amp; !response.error) {
  /* handle the result */
  }
  }
  );
  </code></pre>
  
  <p>But I don't know how to handle. when I try it in graph explorer Result is like</p>
  
  <pre><code>{
  "data": [
  {
  "name": "jindagi na melegi dubara", 
  "unread": 9, 
  "bookmark_order": 999999999, 
  "id": "1398847113716538"
  }, 
  {
  "name": "Online IT Clubs", 
  "unread": 25, 
  "bookmark_order": 999999999, 
  "id": "556540827777044"
  }, 
  {
  "name": "Bank exams preparation(2014)", 
  "bookmark_order": 9, 
  "id": "663444460375219"
   }, 
   ], 
  "paging": {
   "next": "https://graph.facebook.com/v2.0/802942813062683/groups?   icon_size=16&amp;limit=5000&amp;offset=5000&amp;__after_id=enc_AeyYqXtvk-KAYVvplkod74WiEHqLL6BfmTfuR5gchidafW3rWME4kpqm5YdHLPYkVw0o93poJ7Ib41eOoitEi-Tk"
  }
  }
  </code></pre>
  
  <p>I want to use group Id and Name in my app. Can you tell me how to handle result. Thanks in advance.</p>
  
  <p>Edit : I also check foloowing edits 
  Edit 1</p>
  
  <pre><code>FB.api(
  "/me/groups",
  function (response) {
  if (response &amp;&amp; !response.error) {
  response.data[0].name
  }
  }
  );
  </code></pre>
  
  <p>But No result to display.</p>
  
  <p>Edit 2 </p>
  
  <pre><code>FB.api(
  "/me/groups",
  function (response) {
  if (response &amp;&amp; !response.error) {
  for (var l = response.data.length, i = 0; i &lt; l; i++) {
  var obj = response.data[i];
  console.log(obj.name);
  console.log(obj.id);
  }
  }
  }
  );
  </code></pre>
  
  <p>Same problem again</p>