0
votes

I'm using the Rest of components Delphi XE7 and trying to play the information within a clientdataset. However, I can not transfer to the CDS the second node json below (list Facebook groups). I can only arrange for clientdataset fields "first_name", "birthday" and "id". The groups will format of Object and I can not get the information. I'm following an example of the pier itself, but there is a simple array, when I try to do with the json with nested array as the example of Facebook do not succeed.

How to proceed?

{
  "groups": {
    "data": [
      {
        "name": "DIVULGAÇÃO TOTALMENTE LIVRE", 
        "id": "1349178233788", 
        "administrator": false, 
        "bookmark_order": 26, 
        "unread": 25
      }, 
      {
        "name": "FREELAS DIVERSOS Multimeios Cinema Tv Publicidade Artes Marketing TI (...)", 
        "id": "39502212", 
        "administrator": false, 
        "bookmark_order": 11, 
        "unread": 25
      }
    ], 
    "paging": {
      "cursors": {
        "before": "MTM0OTE3ODIzMx", 
        "after": "Mzk1MDIDQyMDcw"
      }, 
      "next": "https://graph.facebook.com/v2.3/100097464823/groups?pretty=0&limit=2&after=Mzk1MDIyQyMDcw"
    }
  }, 
  "first_name": "Anderson", 
  "birthday": "12/26/1985", 
  "id": "100003178458823"
}
1
You can also use TRESTResponseDataSetAdapter to plug it into a TFDMemTable. - FMXExpress

1 Answers

2
votes

I even decided. If anyone is having the same problem, the solution is to point the property of RootElement RESTResponse to, in my case, the element "groups.data" the json, it will list all groups.