I am looking to update the value in a chaseObj from the method in another object. Please Advise, Thank you!
var s, searchUts;
var getValue = '';
var generateObject = function() {
var chaseObj = {
"timeFilters" : getValue
};
return chaseObj;
};
searchUts = s = {
createValue: function() {
var x = 10;
var y = 20;
getValue = x + y; //append this value to chaseObj inside the generateObject
},
postToBackEnd: function() {
var chaseObj = generateObj();
$.ajax({
url: localhost:8080/site/home,
data:JSON.stringify(chaseObj) //chaseObj is not updated with new value here
})
}
};
timeFiltersa getter function.