# Problem with remote dataset JSON

**URL:** https://community.xibo.org.uk/t/problem-with-remote-dataset-json/14330
**Category:** Get Help
**Created:** [May 9, 2018, 2:09pm UTC](https://community.xibo.org.uk/t/problem-with-remote-dataset-json/14330 "2018-05-09T14:09:15Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![riopangeran](https://community.xibo.org.uk/letter_avatar_proxy/v4/letter/r/a4c791/32.png) [@riopangeran](https://community.xibo.org.uk/u/riopangeran)
#### Post date: [May 9, 2018, 2:09pm UTC](https://community.xibo.org.uk/t/problem-with-remote-dataset-json/14330/1 "2018-05-09T14:09:16Z")

</div>

Here’s my result from test url

```
{
   "entries": [
      {
         "wifi": "GuestAP",
         "rows": {
            "tglAwal": "7 Mei 2018",
            "tglAkhir": "13 Mei 2018",
            "password": "WifiPass100"
         }
      }
   ],
   "number": 1,
   "processed": [
      [
         {
            "Tanggal Awal": "tglAwal",
            "Tanggal Akhir": "7 Mei 2018"
         },
         {
            "Tanggal Awal": "tglAkhir",
            "Tanggal Akhir": "13 Mei 2018"
         },
         {
            "Tanggal Awal": "password",
            "Tanggal Akhir": "WifiPass100"
         }
      ]
   ],
   "messages": [
      "Processing 1 results into 3 potential columns",
      "Processing Result with Data Root rows",
      "DataRoot is an object",
      "Processing as Multiple Rows",
      "Processing tglAwal",
      "Processing tglAkhir",
      "Processing password",
      "Consolidating entries",
      "There are 3 entries in total"
   ]
} 

```

I have tried to make Data root to rows but still the fetch was not as expected.

I expect that the dataset return only 1 row, but as you can see, it was processed to 3 rows.

DId i miss something here?

---

<div class="post-metadata">

### Author: ![riopangeran](https://community.xibo.org.uk/letter_avatar_proxy/v4/letter/r/a4c791/32.png) [@riopangeran](https://community.xibo.org.uk/u/riopangeran)
#### Post date: [May 9, 2018, 11:35pm UTC](https://community.xibo.org.uk/t/problem-with-remote-dataset-json/14330/2 "2018-05-09T23:35:16Z")

</div>

Still no luck so far, i couldn’t make it right.

Here’s my dataset column setting

 ![Capture_01](https://community.xibo.org.uk/uploads/default/original/2X/3/391bc2b7ed7669518d7c956eede72f43979e8ea7.JPG) ![Capture_03](https://community.xibo.org.uk/uploads/default/original/2X/a/affcc8d60ac221313d7e116659152f118bab7a54.JPG) ![Capture_02](https://community.xibo.org.uk/uploads/default/original/2X/f/f749de8c403c5471d095f7f3d43a47f17d993e5a.JPG)

I think i already put it right for the column data setting.

==

One more thing, i also tried to catch the credential username and password using $\_POST , but the array is empty.

So how do i catch those variables?

My CMS is v.1.8.9 using docker.

---

<div class="post-metadata">

### Author: ![caro](https://community.xibo.org.uk/letter_avatar_proxy/v4/letter/c/b19c9b/32.png) [@caro](https://community.xibo.org.uk/u/caro)
#### Post date: [May 17, 2018, 12:14pm UTC](https://community.xibo.org.uk/t/problem-with-remote-dataset-json/14330/3 "2018-05-17T12:14:59Z")

</div>

Hello!  
If I understood correctly, your JSON will understand 2 colomns only : one with “tglAwal”, “tglAkhir” and “password” and another with “7 Mei 2018”, “13 Mei 2018” and “WifiPass100”.

Like this example : [Data Set -\> Remote data source](https://community.xibo.org.uk/t/data-set-remote-data-source/13337)

If you want 3 colomns, perhaps the JSON will be rather :  
`
{
“wifi”: “GuestAP”,
“rows”: [
{“tglAwal”: “7 Mei 2018”},
{“tglAkhir”: “13 Mei 2018”},
{“password”: “WifiPass100”}
]
}
`

And to edit Colomn, in Remote Data Path you should write juste tglAwal, tglAkhir or password.

I don’t know if it’s what you want, but it’s like this that I successed.

---

<div class="post-metadata">

### Author: ![Peter](https://community.xibo.org.uk/user_avatar/community.xibo.org.uk/peter/32/8154_2.png) [@Peter](https://community.xibo.org.uk/u/Peter)
#### Post date: [May 17, 2018, 12:46pm UTC](https://community.xibo.org.uk/t/problem-with-remote-dataset-json/14330/4 "2018-05-17T12:46:42Z")

</div>

Indeed json in that format might not be correctly understood there.

You could have it as an array like here [Remote Dataset - Trouble configuring Remote Data Path](https://community.xibo.org.uk/t/remote-dataset-trouble-configuring-remote-data-path/14098)

so say something like this in json.

```auto
 {
         "wifi": "GuestAP",
         "rows":[
		{
            "tglAwal": "7 Mei 2018",
            "tglAkhir": "13 Mei 2018",
            "password": "WifiPass100"
		},
		{
			"tglAwal": "15 Mei 2018",
            "tglAkhir": "23 Mei 2018",
            "password": "WifiPass122"
		}
    ]
 }

```

3 columns with the remote data path corresponding to the names in .json ie  
`tglAwal`, `tglAkhir` and `password` for your 3 columns.

data root in dataset would be rows as well as in the other example and the processed data should be

```auto
 "processed": [
      [
         {
            "tglAwal": "7 Mei 2018",
            "tglAkhir": "13 Mei 2018",
            "password": "WifiPass100"
         },
         {
            "tglAwal": "15 Mei 2018",
            "tglAkhir": "23 Mei 2018",
            "password": "WifiPass122"
         }
      ]
   ],

```

---

<div class="post-metadata">

### Author: ![riopangeran](https://community.xibo.org.uk/letter_avatar_proxy/v4/letter/r/a4c791/32.png) [@riopangeran](https://community.xibo.org.uk/u/riopangeran)
#### Post date: [May 17, 2018, 2:29pm UTC](https://community.xibo.org.uk/t/problem-with-remote-dataset-json/14330/5 "2018-05-17T14:29:45Z")

</div>

I tried again, and this time i copied the example JSON above and compress it using jsonlint ,  
here’s the result

 ![Capture_xibo-00](https://community.xibo.org.uk/uploads/default/original/2X/0/0a82b869bb57d495ed4cc475181d50e72e239853.JPG)

Then i try to call it using postman :

 ![Capture_xibo-01](https://community.xibo.org.uk/uploads/default/original/2X/e/e92e6f5b020e0ee1b5506b1b3b99f403767a84fa.JPG)

I think, so far so good, then i try to recreate the DataSet :

 ![Capture_xibo-02](https://community.xibo.org.uk/uploads/default/original/2X/6/6c831a31cda13dd57e00948897295d6928e1a776.JPG) ![Capture_xibo-04](https://community.xibo.org.uk/uploads/default/original/2X/a/a26ebfa7619fcec73c80d11f230c9cee7fee4806.JPG) ![Capture_xibo-03](https://community.xibo.org.uk/uploads/default/original/2X/e/e25492cf81346896be6b59567ad70e9c3a2cc886.JPG)

But then when i try to test the data url , here’s the result :

 ![Capture_xibo-05](https://community.xibo.org.uk/uploads/default/original/2X/4/44c8fc889afc618a163bedf954cd5db1557ad7be.JPG)

Here’s the complete response from xibo :

```
{
   "entries": [
      {
         "wifi": "GuestAP",
         "rows": [
            {
               "tglAwal": "7 Mei 2018",
               "tglAkhir": "13 Mei 2018",
               "password": "WifiPass100"
            },
            {
               "tglAwal": "15 Mei 2018",
               "tglAkhir": "23 Mei 2018",
               "password": "WifiPass122"
            }
         ]
      }
   ],
   "number": 1,
   "processed": [
      [
         [],
         []
      ]
   ],
   "messages": [
      "Processing 1 results into 3 potential columns",
      "Processing Result with Data Root rows",
      "DataRoot is an array",
      "Processing 0",
      "Processing 1",
      "Consolidating entries",
      "There are 2 entries in total"
   ]
}

```

Any idea , did i miss something here?

---

<div class="post-metadata">

### Author: ![Peter](https://community.xibo.org.uk/user_avatar/community.xibo.org.uk/peter/32/8154_2.png) [@Peter](https://community.xibo.org.uk/u/Peter)
#### Post date: [May 17, 2018, 2:31pm UTC](https://community.xibo.org.uk/t/problem-with-remote-dataset-json/14330/6 "2018-05-17T14:31:50Z")

</div>

The remote data path is incorrect.

As I mentioned it should be tglAwal, tglAkhir, password instead of what you currently have ie 0,1,2

---

<div class="post-metadata">

### Author: ![riopangeran](https://community.xibo.org.uk/letter_avatar_proxy/v4/letter/r/a4c791/32.png) [@riopangeran](https://community.xibo.org.uk/u/riopangeran)
#### Post date: [May 17, 2018, 2:39pm UTC](https://community.xibo.org.uk/t/problem-with-remote-dataset-json/14330/7 "2018-05-17T14:39:34Z")

</div>

Ahh yes, thank you, i just missed that point,  
Don’t know why i put those numbers, maybe i missed read something that i have to put relative number there.

Thank you Peter, it solved now…

---

<div class="post-metadata">

### Author: ![zuji4antho](https://community.xibo.org.uk/letter_avatar_proxy/v4/letter/z/b782af/32.png) [@zuji4antho](https://community.xibo.org.uk/u/zuji4antho)
#### Post date: [August 13, 2018, 4:02pm UTC](https://community.xibo.org.uk/t/problem-with-remote-dataset-json/14330/8 "2018-08-13T16:02:08Z")

</div>

pak riopangeran apakah masalah datasetnya sudah beres?? mohon info nya dunk…

---

<div class="post-metadata">

### Author: ![system](https://community.xibo.org.uk/uploads/default/original/2X/a/a8759c2d8cc561474733895ac75beeb830f5d8ca.png) [@system](https://community.xibo.org.uk/u/system)
#### Post date: [March 4, 2020, 5:11pm UTC](https://community.xibo.org.uk/t/problem-with-remote-dataset-json/14330/9 "2020-03-04T17:11:01Z")

</div>


