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.
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.
Read the statement by Michael Teeuw here.
D
Latest posts made by DeathChicken
-
RE: Trim the fat in a JSON file?
-
RE: Trim the fat in a JSON file?
Tried that. It doesn’t work.
The field just doesn’t display any data at all
if i set
values: [""]
it shows
-
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 is0:[{"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?