Finding the SECOND lowest number in an array


#21

If the issue is the data which $weather.conditions.current_observation.pressure_in returns, then you could check that variable before continuing. If you knew what you were expecting you could try a looping until it returns something you could use, if you try this I suggest a pause in the loop or you might kill your hubs processing power if it gets stuck for a while.


#22

I have heard horror stories about looping in webCoRE, so have avoided it like the plague, LOL (at least until backup/restore pistons are functional)

I did program an IF checker designed to catch the bad data, but I have yet to find a solution in that thread. (seen in post #4 above) So, as a workaround to the workaround, finding the second lowest number in the array would (at least) let me override any bad numbers. (or even finding the lowest number that is above zero would work as well) Is there any code for this?