MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord

    MMM-JsonTable, keeps loading

    Troubleshooting
    2
    4
    186
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • I
      Impertus last edited by

      Hi. i am trying to get som bus times om my MM.

      Have install the Jsontable and using this config here.

      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-JsonTable.js [all]
      Saw an issue on the github page, (nested arrays)
      https://github.com/timdows/MMM-JsonTable/blob/master/MMM-JsonTable.js#L61

      if (this.config.arrayName) {
      	items = this.jsonData[this.config.arrayName]["all"];
      } else {
      	items = this.jsonData;
      }
      
      S 1 Reply Last reply Reply Quote 0
      • S
        sdetweil @Impertus last edited by

        @Impertus said in MMM-JsonTable, keeps loading:

        keepColumns: [“Name”] // Optional

        the named field is ‘name’, not ‘Name’
        one of the array elements

            "name":"Bus 211",                // <- 
            "type":"BUS",
            "stop":"Randers Produktionshøjskole/Grenåvej",
            "time":"13:47",
            "date":"05.06.20",
            "id":"731643901",
            "line":"211",
            "messages":"0",
            "rtTime":"13:51",
            "rtDate":"05.06.20",
            "finalStop":"Ørsted (Norddjurs Kom)",
            "direction":"Ørsted",
        

        Sam

        Create a working config
        How to add modules

        1 Reply Last reply Reply Quote 0
        • I
          Impertus last edited by

          yeahh. it works now…

          Now is just the
          descriptiveRow:

          that wont show up 😃

          S 1 Reply Last reply Reply Quote 0
          • S
            sdetweil @Impertus last edited by

            @Impertus

            keepNames requires ALL the fields to show (of all the fields available) … u only said name

            keepColumns [] Columns on json will be showed

            and if u want it formatted a specific way

            from the module example

            	descriptiveRow: '<tr><td>Name</td><td>Today</td><td>ThisWeek</td><td>LastWeek</td><td>ThisMonth</td><td>LastMonth</td></tr>'
            

            you have to make a little table row type declaration

            Sam

            Create a working config
            How to add modules

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            • First post
              Last post
            Enjoying MagicMirror? Please consider a donation!
            MagicMirror created by Michael Teeuw.
            Forum managed by Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
            This forum is using NodeBB as its core | Contributors
            Contact | Privacy Policy