Refactor code for 'forecast'

- Add function getAttribute()
- Refactor of forecast() function
Refactored current()

- get json instead of XML
- refactored function to deal with json