The way i do it in my game is that every time the succesfuly finishes the level and unlocks a new one, i first add all this new data to the Levels array, and after that is finished, i save the LevelsArray as JSON into my Local Storage. You load from LocalStorage when you start the game either on the Loader Layout or on your Main Menu.
So you need:
.-A LevelArray object, it stores the level data included if it is unlocked or not.
.-Local Storage object, you save into this each time you know the player unlocked something. You save as JSON, for example LocalStorage set key "SaveGame" -> LevelArray.AsJSON
.- On start of layout either on Loader Layout or Main Menu, you ask for LocalStorage "SaveGame" key.
.- On Load Storage get key complete action -> LevelArray Load as JSON -> LocalStorage.ItemValue (this returns the last data you asked for, in this case the JSON)
Hope this helps!