MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    1. Home
    2. DeathChicken
    3. Posts
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.
    D
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 3
    • Groups 0

    Posts

    Recent Best Controversial
    • RE: Trim the fat in a JSON file?

      Thank you so much.
      I wasn’t sure where to add the [0] exactly. But at least I had somethign to play with.
      After a couple tries values: [“0.price”] yields output of Price: “2.1” which is clear enough for my needs.

      posted in Troubleshooting
      D
      DeathChicken
    • RE: Trim the fat in a JSON file?

      Tried that. It doesn’t work.
      The field just doesn’t display any data at all
      alt text

      if i set

      values: [""]
      

      it shows alt text

      posted in Troubleshooting
      D
      DeathChicken
    • Trim the fat in a JSON file?

      So, I got my MM working. Set up a few modules and learning along the way.
      Than comes the JSON file that I get to display, but I only care about a part of it.
      Its a ComEd Hourly Pricing and the output it gives is

      0:[{"millisUTC":"1517732400000","price":"2.1"}]
      

      I just want the 2.1 output

      there is a “values” option that seems to be what I need to use,
      ie:

      Example: [“key1”, “key2”, “keyA.keyB.keyC”]

      but when I add the last line

      {
          module: 'MMM-json-feed',
          position: 'bottom_left',
          config: {
            url: 'https://hourlypricing.comed.com/api?type=currenthouraverage&format=json',
            title: "ComEd Hourly Pricing",
            values: ["key4"],
            
          }
        },
      

      it doesnt work.

      Am I doing something wrong?

      posted in Troubleshooting
      D
      DeathChicken
    • 1 / 1