Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Get all keys matching a char string
Message
De
30/11/2015 16:40:46
 
 
Information générale
Forum:
HTML5
Catégorie:
Stockage local
Divers
Thread ID:
01628117
Message ID:
01628119
Vues:
36
J'aime (1)
>Hi,
>
>Say I have the following strings (serialized JSON) (Key and Value in the local storage (simplified):
>
>
>"PM_ABCD","long string is here"
>"PM_1233", "another long string here"
>"ABC", "Another long string"
>"PM_G134555","long string"
>
>
>Can I get all keys - into an object - (without getting the Value) that start with a string "PM_"?
>
>TIA

I haven't used local storage before, but I'm guessing you probably need to iterate through the keys to find it. See http://tutorials.jenkov.com/html5/local-storage.html#iterating-keys-in-the-local-storage.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform