I have the following code in the Javascript
var data = {
itemFromIndex : status.next,
requestId : status.requestId,
loggedInAdminId: self.loggedInAdminId,
fetchedAllTerms : status.fetchedAllTerms
}
How can i add an another item later into the data object?
like i want to add
dbTermsFetchToIndex : status.dbTermsFetchToIndex
into data.
First, that’s not an array, it’s an object literal. Second, yes you can:
Will have the same effect as if you declared it in your object literal in the first place.