I am developing extension and I want to read and change local JSON file in extension file directory.
How to make this?
I am developing extension and I want to read and change local JSON file in extension file directory.
How to make this?
I don't know if you can store data in a JSON file, but you can always use localStorage. If you set the localStorage, the data will not disappear every time you open the extension popup.
let data = JSON.parse(localStorage.data ?? "{}");
data.say = "hello world";
localStorage.data = JSON.stringify(data);