of_interest = "Kroger-04";
function init() {
var paragraph_object =
document.getElementById("paragraph");
var data_list = sample_data.split(';');
for (j = 0; j < data_list.length; j++) {
parts = data_list[j].split(':');
var site = parts[0].trim()
if (site == of_interest) {
var message = "Given the sample data '" + sample_data + "', this program parsed out the
price $" + parts[1].trim() + " for the " + site + " site.";
paragraph_object.innerHTML = message;
}
}
}
Parsing complex data
Welcome.