1

I have code read data but it read with localStorage. I want to change read localStorage to read a text file. because when I switched to another computer file data will not be displayed. Please help me.

data in text file

var Hello = {
    "nodes": {
        "Hello": {
            "label": "Hello"
        },
        "textbox": {
            "label": "Help me please!"
        },
        "due_date": {
            "label": "2016-04-16"
        }
    }
}

code read data

loaddata = function () {  

    if (localStorage.length > 0) {
        for(var i = 0; i < localStorage.length; i++) {
            if (localStorage.hasOwnProperty('title_' + i)) {
                createNewTile(
                    JSON.parse(localStorage.getItem('title_' + i))
                );
            }
        }
Fear555
  • 9
  • 3

0 Answers0