timdows / MMM-JsonTable

A module for the MagicMirror project which creates a table filled with a list gathered from a json request.
MIT License
25 stars 31 forks source link

Json data keeps loading #12

Open Impertus opened 4 years ago

Impertus commented 4 years ago

Hi.

I am trying to get your module to work :)

i have the json url: http://xmlopen.rejseplanen.dk/bin/rest.exe/departureBoard?id=731643902&format=json

This i my config. module: 'MMM-JsonTable', position: 'bottom_right', header: 'Bus tider ', config: { url: 'https://xmlopen.rejseplanen.dk/bin/rest.exe/departureBoard?id=731643902&format=json' arrayName: 'Departure', keepColumns: ["Name"] // Optional } },

I have made the adding to line 61 in MMM-Json.js [all]

timdows commented 4 years ago

Yes correct. The first element of your json response is DepartureBoard That will indeed only work if you force this on line 61

items = this.jsonData.DepartureBoard[this.config.arrayName];

Hope all is working fine now!

gabriel-gfs commented 4 years ago

Hi. I am also trying to get your module to work but it keeps saying that its awaiting json data. This is the json file: { "eins":[ { "zeit": "24h", "erfasst": 1001, "faktoriert": 1215 }, { "zeit": "48h", "erfasst": 0, "faktoriert": 230 }, { "zeit": "älter", "erfasst": 36, "faktoriert": 1212 } ] }, { "zwei":[ { "zeit": "24h", "erfasst": 367, "faktoriert": 495 }, { "zeit": "48h", "erfasst": 0, "faktoriert": 19 }, { "zeit": "älter", "erfasst": 64, "faktoriert": 140 } ] } and this is the part in the config.js file { module: 'MMM-JsonTable', position: 'middle_center', header: 'Liegelager', config:{ url: 'https://infoscreen.greiffmode.local/logistik.json', arrayName: 'eins', size: 3 } },

timdows commented 3 years ago

@golli1337 Is there any debug information in the console of your broswer?

gabriel-gfs commented 3 years ago

@golli1337 Is there any debug information in the console of your broswer? No there isn't. At least there are no errors concerning MMM-JsonTable. The only available information to me is the output that its awaiting json data.