# File Picker: how to get/read the content of a JSON file?

**URL:** https://community.thunkable.com/t/file-picker-how-to-get-read-the-content-of-a-json-file/1940226
**Category:** Questions about Thunkable X
**Tags:** json, file-picker
**Created:** [June 25, 2022, 6:17pm UTC](https://community.thunkable.com/t/file-picker-how-to-get-read-the-content-of-a-json-file/1940226 "2022-06-25T18:17:59Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![paulovaz72](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/paulovaz72/32/119071_2.png) [@paulovaz72](https://community.thunkable.com/u/paulovaz72)
#### Post date: [June 25, 2022, 6:17pm UTC](https://community.thunkable.com/t/file-picker-how-to-get-read-the-content-of-a-json-file/1940226/1 "2022-06-25T18:17:59Z")

</div>

Hi Thunkers,

I want implement an app backup/restore function using Json files, like demonstrated by @muneer [here](https://community.thunkable.com/t/backup-restore-your-local-table-by-email/1838977).

But I don’t want the user to use the e-email copy & paste strategy, that will expose the structure of my database, besides the complexity of the process for regular users. So the idea is to SAVE a local backup file, and when need restore, LOAD in app the saved file locally.

To save I think the idea in [this post](https://community.thunkable.com/t/backup-local-database-idea-your-thoughts/1387482/7) can help. But how about the restore?

It’s possible to use the filepicker to get a Json file content and apply it in a variable? This way will be easy to restore.

I tried this,

![Captura de tela de 2022-06-25 15-27-42](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/b/4/b478a8255add539f50a6d23e1fd7df183e128822.png)

but not return the file content:

 ![Captura de tela de 2022-06-25 15-30-33](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/b/5/b5e34165d5820eb1bcfc2ce5c65f85c68aeefcae.png)

Any idea how to get the file content?

Regards,

Paulo Vaz

---

<div class="post-metadata">

### Author: ![zander](https://avatars.discourse-cdn.com/v4/letter/z/ecb155/32.png) [@zander](https://community.thunkable.com/u/zander)
#### Post date: [June 25, 2022, 6:32pm UTC](https://community.thunkable.com/t/file-picker-how-to-get-read-the-content-of-a-json-file/1940226/2 "2022-06-25T18:32:02Z")

</div>

Have you tried doing get object from json?

---

<div class="post-metadata">

### Author: ![paulovaz72](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/paulovaz72/32/119071_2.png) [@paulovaz72](https://community.thunkable.com/u/paulovaz72)
#### Post date: [June 25, 2022, 6:32pm UTC](https://community.thunkable.com/t/file-picker-how-to-get-read-the-content-of-a-json-file/1940226/3 "2022-06-25T18:32:37Z")

</div>

look my update on the original post to check what I’m doing…

My question is how to put the content from a .json file stored locally in a variable / label…

---

<div class="post-metadata">

### Author: ![zander](https://avatars.discourse-cdn.com/v4/letter/z/ecb155/32.png) [@zander](https://community.thunkable.com/u/zander)
#### Post date: [June 25, 2022, 6:34pm UTC](https://community.thunkable.com/t/file-picker-how-to-get-read-the-content-of-a-json-file/1940226/4 "2022-06-25T18:34:57Z")

</div>

Oh! I actually have the same question lol Hopefully we get an answer 😉

---

<div class="post-metadata">

### Author: ![hatmanactions](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/hatmanactions/32/134611_2.png) [@hatmanactions](https://community.thunkable.com/u/hatmanactions)
#### Post date: [June 26, 2022, 12:29am UTC](https://community.thunkable.com/t/file-picker-how-to-get-read-the-content-of-a-json-file/1940226/5 "2022-06-26T00:29:49Z")

</div>

Maybe not with filepicker but probably this approach would be helpful:  
 ![example2](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/a/0/a09c8a3caf15e80ed6e3958a6b3e00b598c12b72.png)

Obviously instead “set Label1’s Text to response” you can parse content of picked csv file (response) to get exact variable from it.  
Hope it will be helpful to achieve what you need.

---

<div class="post-metadata">

### Author: ![paulovaz72](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/paulovaz72/32/119071_2.png) [@paulovaz72](https://community.thunkable.com/u/paulovaz72)
#### Post date: [June 26, 2022, 3:41am UTC](https://community.thunkable.com/t/file-picker-how-to-get-read-the-content-of-a-json-file/1940226/6 "2022-06-26T03:41:09Z")

</div>

Fantastic! I never realized that this approach could work for reading the contents of a text file…

These are things that are not officially documented, but should be…

Thanks for the help and congratulations on the knowledge shown!

---

<div class="post-metadata">

### Author: ![paulovaz72](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/paulovaz72/32/119071_2.png) [@paulovaz72](https://community.thunkable.com/u/paulovaz72)
#### Post date: [June 26, 2022, 3:51am UTC](https://community.thunkable.com/t/file-picker-how-to-get-read-the-content-of-a-json-file/1940226/7 "2022-06-26T03:51:26Z")

</div>

Taking advantage of your answer, I have another need that is to delete local files on the device (of the images that I uploaded via mediaDB to Cloudinary that Thunkable keeps locally but never delete from the device).

Any idea in how to delete local files via Thunkable?

Regards,

Paulo Vaz

---

<div class="post-metadata">

### Author: ![hatmanactions](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/hatmanactions/32/134611_2.png) [@hatmanactions](https://community.thunkable.com/u/hatmanactions)
#### Post date: [June 26, 2022, 10:08pm UTC](https://community.thunkable.com/t/file-picker-how-to-get-read-the-content-of-a-json-file/1940226/8 "2022-06-26T22:08:58Z")

</div>

Unfortunatelly I am not sure if there is some kind of workaround to do so.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)
#### Post date: [September 24, 2022, 10:09pm UTC](https://community.thunkable.com/t/file-picker-how-to-get-read-the-content-of-a-json-file/1940226/9 "2022-09-24T22:09:49Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
