I have nested object
var model = {
weather: {
allData: ""
},
woeid: {
id: 2389646,
searchText: "davis",
woeidScript: "some string'"+searchText+"' another string",
forcastScript: "",
found: true
}
};
searchText in woeidScript returns undefined. How can reference this local object?
searchTextreferences the variable called that. In order to DRY, we would have to look at the code surrounding it.