refactored JSON call to get weather temperature