MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    Get the correct JSON data

    Scheduled Pinned Locked Moved Development
    15 Posts 2 Posters 1.6k Views 2 Watching
    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.
    • S Offline
      sdetweil @htilburgs
      last edited by

      @htilburgs

      let foovar = payload.liveweer[0]

      then you can use foovar to reference the data

      json is just a text description of an object
      it coverts directly into js with the same structure

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      htilburgsH 2 Replies Last reply Reply Quote 0
      • htilburgsH Offline
        htilburgs @sdetweil
        last edited by

        @sdetweil said in Get the correct JSON data:

        coverts directly into js with the same structure

        I will try tonight. I’m at work (yeh right ;-) right now.

        (still trying to learn JS, but not afraid to ask) ☺

        1 Reply Last reply Reply Quote 0
        • htilburgsH Offline
          htilburgs @sdetweil
          last edited by

          @sdetweil said in Get the correct JSON data:

          let foovar = payload.liveweer[0]

          Is there a simple way to check what is in foovar?

          (still trying to learn JS, but not afraid to ask) ☺

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

            @htilburgs console.log() same as before, BUT it is displayed in the developers window console table when its in the browser side module.js (modulename.js)

            ctrl-shift-i, select the console tab

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            htilburgsH 1 Reply Last reply Reply Quote 0
            • htilburgsH Offline
              htilburgs @sdetweil
              last edited by

              @sdetweil Thanks, that works!
              Now I can really see what I’m doing.

              (still trying to learn JS, but not afraid to ask) ☺

              1 Reply Last reply Reply Quote 1
              • 1
              • 2
              • 2 / 2
              • First post
                Last post
              Enjoying MagicMirror? Please consider a donation!
              MagicMirror created by Michael Teeuw.
              Forum managed by Sam, technical setup by Karsten.
              This forum is using NodeBB as its core | Contributors
              Contact | Privacy Policy