homer icon indicating copy to clipboard operation
homer copied to clipboard

Message not reading child object in JSON

Open fitur opened this issue 2 years ago • 1 comments

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

fitur avatar Sep 16 '21 10:09 fitur

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 !

bastienwirtz avatar Sep 21 '21 20:09 bastienwirtz