# Problem reading from my pod a geojson file

**URL:** https://forum.solidproject.org/t/problem-reading-from-my-pod-a-geojson-file/2806
**Category:** Build a Solid App
**Created:** [March 27, 2020, 6:18pm UTC](https://forum.solidproject.org/t/problem-reading-from-my-pod-a-geojson-file/2806 "2020-03-27T18:18:32Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Borjarguez](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/borjarguez/32/1536_2.png) [@Borjarguez](https://forum.solidproject.org/u/Borjarguez)
#### Post date: [March 27, 2020, 6:18pm UTC](https://forum.solidproject.org/t/problem-reading-from-my-pod-a-geojson-file/2806/1 "2020-03-27T18:18:32Z")

</div>

Hi everyone!! My team and i are having some problems reading a geojson file we have already uploaded to our pod. The url works well but we can’t access to the content at fechtDocument function, don’t know why. We’ll appreciate your help. Thanks!!

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/solidproject/original/2X/c/c42de9e49ae76fc7d53b0216545b05ec081d0a08.png)

---

<div class="post-metadata">

### Author: ![Vincent](https://avatars.discourse-cdn.com/v4/letter/v/e9bcb4/32.png) [@Vincent](https://forum.solidproject.org/u/Vincent)
#### Post date: [March 27, 2020, 6:50pm UTC](https://forum.solidproject.org/t/problem-reading-from-my-pod-a-geojson-file/2806/2 "2020-03-27T18:50:56Z")

</div>

Hi @Bojarguez, that looks like you’re using [Tripledoc](https://vincenttunru.gitlab.io/tripledoc/), no?

Tripledoc reads RDF data, e.g. data you’ve also written to your Pod using Tripledoc or a different RDF library. I’d recommend to take a couple of minutes to work through [this tutorial](https://solidproject.org/for-developers/apps/first-app) to understand more about what it does.

In this case, your geojson file is not RDF data, I presume? In that case, you’ll probably want to use the more generic `fetch` function from solid-auth-client, which behaves just like [the browser’s fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch). Thus, it’d look more like:

```javascript
    fetch(folder.filter[i].url)
      .then(response => response.json())
      .then(content => routeDocument = content);

```

(Note also that you don’t need `await` if you call `.then()`.)

---

<div class="post-metadata">

### Author: ![A\_A](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/a_a/32/786_2.png) [@A\_A](https://forum.solidproject.org/u/A_A)
#### Post date: [March 27, 2020, 7:34pm UTC](https://forum.solidproject.org/t/problem-reading-from-my-pod-a-geojson-file/2806/3 "2020-03-27T19:34:02Z")

</div>

> [@Vincent](#):
>
> (Note also that you don’t need `await` if you call `.then()` .)

I guess it’s necessary there so in the rest of the for-loop body `routeDocument` can be used. You could also switch to only using await there (but I guess that’s a matter of taste):

```javascript
const res = await solidAuthClient.fetch(folder.files[i].url)
if (!res.ok) {
  // error handling
}
const routeDocument = await res.json()

```

Apart from that, I think Vincent’s answer is on point :))
