# Weather App - Problem with obtaining data using .getJSON

**URL:** <https://forum.freecodecamp.org/t/weather-app-problem-with-obtaining-data-using-getjson/30446>\
**Category:** General\
**Created:** [August 23, 2016, 5:50am UTC](https://forum.freecodecamp.org/t/weather-app-problem-with-obtaining-data-using-getjson/30446 "2016-08-23T05:50:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nims](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/nims/32/160490_2.png) [@Nims](https://forum.freecodecamp.org/u/Nims)\
**Post date:** [August 23, 2016, 5:50am UTC](https://forum.freecodecamp.org/t/weather-app-problem-with-obtaining-data-using-getjson/30446/1 "2016-08-23T05:50:26Z")

</div>

Hey everyone.

I have spent the whole day on this project, I just can’t seem to access the required JSON file, if I put the URL directly into my browser I can see the required JSON file, however if you look at my code I can’t seem to access the data.

[https://codepen.io/nimaiwalsh/pen/QERqRv?editors=1111](https://codepen.io/nimaiwalsh/pen/QERqRv?editors=1111)

Any help would be greatly appreciated.

Kind regards,

Nimai

---

<div class="post-metadata">

**Author:** ![jenovs](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/jenovs/32/60963_2.png) [@jenovs](https://forum.freecodecamp.org/u/jenovs)\
**Post date:** [August 23, 2016, 6:12am UTC](https://forum.freecodecamp.org/t/weather-app-problem-with-obtaining-data-using-getjson/30446/2 "2016-08-23T06:12:14Z")

</div>

Change codepen’s address url to `https://codepen...`

Add `https://crossorigin.me/` to `url`:

```auto
url = "https://crossorigin.me/https://api.forecast.io/forecast/deff4dbff9bda84749e37c93d6e81d73/" + lat + ',' + long + '?units=auto';

```

---

<div class="post-metadata">

**Author:** ![Nims](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/nims/32/160490_2.png) [@Nims](https://forum.freecodecamp.org/u/Nims)\
**Post date:** [August 23, 2016, 6:27am UTC](https://forum.freecodecamp.org/t/weather-app-problem-with-obtaining-data-using-getjson/30446/3 "2016-08-23T06:27:30Z")

</div>

Thanks alot @jenovs - The crossorigin proxy worked. Still unsure exactly what it does. I will have to do a bit more research.

---

<div class="post-metadata">

**Author:** ![jwilkins.oboe](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/jwilkins.oboe/32/179497_2.png) [@jwilkins.oboe](https://forum.freecodecamp.org/u/jwilkins.oboe)\
**Post date:** [January 16, 2021, 5:28am UTC](https://forum.freecodecamp.org/t/weather-app-problem-with-obtaining-data-using-getjson/30446/4 "2021-01-16T05:28:59Z")

</div>


