How to Get a String that I Previously Set, Using

Hi all

I created an example script to Save and Load data from the Storage Area.

I wrote the following code to save a simple String to the Storage Area:

var FileName="12345.gif";;

As can be seen, my object is not a JSON Packet, but just a simple String.

From what I understood so far, my code above saves a Key-Value pair,
in which the **Name** is "FileName" (like the Variable's Name), and the **Value** is "12345.gif".

I now want to read it back, so I wrote this code:"FileName").then
(FileName) => { console.log("FileName="+FileName); }

When I run it, my Debug window shows:

> FileName=[object Object]

It seems that I did get an Object back, and not null.
But what do I need to change, to get to the actual **Value** of the Object that I got?

Thank you

1 thought on “How to Get a String that I Previously Set, Using”

  1. Your `set` code is wrong. It takes an object, not a string. Try this.

    var FileName=”12345.gif”;{FileName: FileName});


    var FileName=”12345.gif”;{FileName});


Leave a Comment