Get value from homeyscript in a variable that can be used in advanced flow

I think this is about the same issue you replied to some years ago, Robert: wanting to get certain values from returned JSON data from

Your post below in English:

  • $ represents the (JSON) object returned by the server
  • liveweer is the name of a “key” in that object; the value associated with the key is an array of values (each value is another object, so $.liveweer is an array-of-objects)
  • [0] is the first element of that array; if you want the second element, you have to use [1] (etc);
  • d0tmax is the name of a key in the (in this case) first element of the liveweer array

The expression is a JSONPath expression. You can here try such expressions in real time: paste the JSON result from the weerlive server into the “JSON” field, enter the JSONPath expression at the top, and on the right you can see the result.

Original Dutch post:

1 Like