Why is the obs an array of arrays? Will there ever be an index other than zero?
For those that wonder what @GaryFunk is talking about (I’m one of them …)
This is part of the api you can use to get data from Weatherflow servers
And since I’m not a coder … your sentence is a bit obscure. Could you elaborate some for future reference ?
First. That’s why I posted in developers.
However my question is based on the following data received from the Hub:
As shown, the obs key is an array of arrays.
We used to send these questions direct to WeatherFlow via email but I was directed to post them here. Perhaps there should be a private group for developers to post to, just to avoid such future confusion.
Gary, this category (#developers) is exactly the place to post such questions!
Answer: Yes, the “obs” field is an array of arrays to allow it to contain multiple observations. While we don’t envision this happening over broadcast protocols like UDP or web socket, we’re trying to use the same JSON format across all protocols that support JSON, and the REST interface supports requests for multiple observations.
Ahhhhh! Yes. That makes sense and I should have realized that from the station observation data from the REST API.
Another “Doh” moment.
I like that you use “obs” for multiple arrays and “ob” for a single array.