Here is the current manually populated array that I'm trying to replace with a MiSO dataset:
var stream = new Array();
stream [0] = "life";
stream [0] = "time";
I want to replace that with a dataset that will automatically populate it. Here is example code that successfully gets the values that are manually entered in the array. There are just two values in the example but could be hundreds and I want to reuse it for others. This is why I want to eliminate the manual entry.
var ds = new Miso.Dataset({
importer: Miso.Dataset.Importers.GoogleSpreadsheet,
parser: Miso.Dataset.Parsers.GoogleSpreadsheet,
key : "0AkNLBJFrSMj2dDdKZ1FkaGIxYnF3U0pjeThIY2pjN3c",
worksheet: "1"
});
ds.fetch({
success : function() {
var magazine = ds.toJSON();
var title1 = magazine[0].name;
var title2 = magazine[1].name;
alert(title1 + " " + title2);
},
error : function() {
}
});
So, I need to create the stream
array from the MISO data set so the format matches:
This doesn't work but is the only way I can explain how the values need to match up in the "new" stream
array for each value that will be found in the MISO datatset:
var stream = new Array();
stream [0] = magazine[0].name;
stream [1] = magazine[1].name;
I need to stay with the MISO stuff and I cannot rename the stream
array.