Comunidad de diseño web y desarrollo en internet online

Array con String Indexer

Citar            
MensajeEscrito el 22 Oct 2005 08:38 pm
Hola.
Necesito tener un Array que para obtener un dato se pueda hacer lo siguiente
MyArray["Key"] = "Value"

Se entiende? Que el indexador sea un string y no un numero.

Gracias

Por JonathanXm

13 de clabLevel



 

msie
Citar            
MensajeEscrito el 22 Oct 2005 10:14 pm
podrías crear un array bidimensional, en uno guardas el dato y en el otro el key, mediante un for haces la busqueda por el key ...

Por _CONEJO

BOFH

7639 de clabLevel

17 tutoriales
21 articulos

 

firefox
Citar            
MensajeEscrito el 23 Oct 2005 11:22 pm
Pues crea un Objeto en vez de un array.
MyObject = {};
MyObject["key"] = "Value";

Por Nahuel

21 de clabLevel



 

safari

 

Cristalab BabyBlue v4 + V4 © 2011 Cristalab
Powered by ClabEngines v4, HTML5, love and ponies.