Could someone please explain how do I properly use this JS module https://github.com/Cocycles/electron-storage
Created json file:
{
"test": []
}
Question:
I've created the file by calling storage.set(filePath, {"test": []})
but how do I change the properties now?
For example, how would I add string "path1"
into the "test"
property of that json file?
When I do the following, it just replaces everything in the file:
storage.get(filePath)
.then(data => { storage.set(filePath, data["test"] = "path1") }