mercredi 11 février 2015

How to put array to store?


i got some EXTJS(javascript) code here:



var plik = document.getElementById("myFile");
var x = file_get_contents(plik.value);
var x = x.split(";");


and it returns:



["1", "2", "3", "4", "5", "645", "32213", "55645645", "123123213", "534534543534543242"]


I would like to put it to



var store = new Ext.data.ArrayStore ({
data: myData,
});


But i dont know, how to transform array correctly just as here:



var myData = [
['3m Co'],
['Alcoa Inc'],
['Altria Group Inc'],
['American Express Company'],
['American International Group, Inc.']
];


Please, gimme some clues because it is annoying :(





Aucun commentaire:

Enregistrer un commentaire