bastienwirtz / homer

A very simple static homepage for your server.
https://homer-demo.netlify.app/
Apache License 2.0
9.19k stars 780 forks source link

Message not reading child object in JSON #286

Open fitur opened 3 years ago

fitur commented 3 years ago

Im trying to utilize the message function but I can't seem to get it right:

message:
  url: https://my.domain.com/tautulli/api/v2?apikey=APIKEY&cmd=arnold
  mapping:
    content: response
  title: "Tautulli"
  content: "Couldn't get dynamic data from Tautulli."

Which shows the message content as: { "result": "success", "message": null, "data": "Dillon, you son of a bitch!" } in the dashboard, which is part of {"response": {"result": "success", "message": null, "data": "Dillon, you son of a bitch!"}} which comes from the Tautulli API.

When I try to map 'content' to the 'message' child object of the JSON response, the message returns the default content value "Couldn't get dynamic data from Tautulli.".

Am I doing something wrong?

image image
bastienwirtz commented 3 years ago

Hey @fitur, thanks for reporting this. the mapping only works on property at the root level for now, but that would be great to map nested properties as well. I'm adding that to my todo list !