Right now if you want to do any edits or arithmetic on retrieved values, you have to create a measure to retrieve the value, then you have to create another measure to do the arithmetic. Being able to use the plugin inline would eliminate that extra measure.
(edit: removed string example because it was redundant)
Thanks in advance!
Edit: some more feature requests, if you don't mind
- option to disable the log warnings when a token isn't found
- ability to get the number of items in an array
raiguard wrote: ↑January 17th, 2020, 2:16 am
- ability to get the number of items in an array
Looks like JsonPath does specify a length function but it is not implemented in NewtonSoft Json. So this will have to be custom. hmm
I was thinking about this originally. Currently objects and arrays are just turned back into strings but seems like not the most useful thing so there might need to a way to specify a function to execute on them.
incertoe wrote: ↑January 17th, 2020, 5:41 am
Are JsonPath filters working?
Should be. Post a full example of your source and query.
I can use JSONPATH queries as follows to get results, but I'm hard pressed to get something akin to the following to work in the plugin. Same data and same query. Likely me missing something here.
JSON SAMPLE
That would be okay, though I would do it like Logging=0. That way you could add other logging modes (2,3,4,...) in the future if you wished.
e2e8 wrote: ↑January 17th, 2020, 8:02 amLooks like JsonPath does specify a length function but it is not implemented in NewtonSoft Json. So this will have to be custom. hmm
I was thinking about this originally. Currently objects and arrays are just turned back into strings but seems like not the most useful thing so there might need to a way to specify a function to execute on them.
Being able to iterate over a table would be awesome. Maybe an Iterate=1 line could be added, so whenever the measure updates, it will move to the next entry in the array. If you combine that with the ability to get the array length, and a loop measure, then you could perform an action on each element in the array.
Your sample works fine for me. I just pasted the json (without the newlines) and the query into the skin and it returned 'Water' as expected.
Try enabling debug logging in Rainmeter and take a look at the log file.
Just wanted to really thank you for this plugin, this is a godsend for the whole community here - working with json-s, the most popular api response format, was a pretty bad experience with rainmeter until now. This should be included in the default plugins.