dipende come è fatta la tua struttura dati, prova a postarla
ciao
sergio