I cannot for the life of me figure out how to write the response template so I get only one item. What’s screwing me up is the key format. If I remove the .'s from the keys, {{#Global Quote}}{{01 symbol}}{{/Global Quote}} will get the ^DJI value. If I keep the .'s, no dice. I’ve tried formatting like {{['01. symbol']}} and pretty much every variation on that theme. Does anyone have any suggestions? Thank you!
I’m almost certain this is impossible. Mustache template selectors don’t support escaping, and spaces seem to cause problems, and dot is completely not going to work because it’s the path separator for nested objects.
Assuming this is the result from the webhook you probably can pass it all the way back to the device as a string and do a brute-force parsing on the device.
(The other issue, where you can’t send up a key with a . in it is true because the request data is stored in a Javascript object, which can’t have a key with a . in it. Actually, Javascript object keys can only be a Unicode letter character, _ or $. But that shouldn’t matter for a response as long as you send the whole response back as a string.)
It’s valid JSON to have almost any character in the key, but it’s not valid Javascript.
There is a valid argument that the data should be able to be all valid JSON, not all valid Javascript objects, but that’s not the way it’s implemented for request data, because it’s stored and manipulated as Javascript objects.