# Ionic 5 - read Json File in asset folder

**URL:** <https://forum.ionicframework.com/t/ionic-5-read-json-file-in-asset-folder/215529>\
**Category:** Ionic Vue\
**Created:** [September 28, 2021, 7:58pm UTC](https://forum.ionicframework.com/t/ionic-5-read-json-file-in-asset-folder/215529 "2021-09-28T19:58:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lona](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/lona/32/102988_2.png) [@Lona](https://forum.ionicframework.com/u/Lona)\
**Post date:** [September 28, 2021, 7:58pm UTC](https://forum.ionicframework.com/t/ionic-5-read-json-file-in-asset-folder/215529/1 "2021-09-28T19:58:52Z")

</div>

How do I read a JSON file that’s located in the Assets folder?

In Angular/Ionic 5 I did the following:

this.http.get(’/assets/data/somefile.json’)

I’m using Axios in order to retrieve external API, and that works fine, tried to use this here as well, but couldn’t get that to work.

---

<div class="post-metadata">

**Author:** ![Tommertom](https://avatars.discourse-cdn.com/v4/letter/t/ed8c4c/32.png) [@Tommertom](https://forum.ionicframework.com/u/Tommertom)\
**Post date:** [September 28, 2021, 8:13pm UTC](https://forum.ionicframework.com/t/ionic-5-read-json-file-in-asset-folder/215529/2 "2021-09-28T20:13:56Z")

</div>

> [@Lona](#):
>
> this.http.get(’/assets/data/somefile.json’)

This is the advised way for local assets in assets folder (angular at least). What is going wrong?

And how does that relate to axios (which I dont know)

---

<div class="post-metadata">

**Author:** ![Lona](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/lona/32/102988_2.png) [@Lona](https://forum.ionicframework.com/u/Lona)\
**Post date:** [September 28, 2021, 8:27pm UTC](https://forum.ionicframework.com/t/ionic-5-read-json-file-in-asset-folder/215529/3 "2021-09-28T20:27:57Z")

</div>

I figured what I was doing wrong. I put the Assset folder in the src/ folder, instead of Public folder.

Worked better now 🙂

In regards to using Axios vs http, not sure how to use http - that’s all 🙂
