I’m trying to pass a JSON object to Enyo using a web server. The file being loaded from the service in Enyo:
{ "Comments" : ["NewComment 1", "NewComment 2", "NewComment 3" ]}
The following callback for the service generates an error saying
gotComments: function(inSender, inResponse) {
this.serverReply = InResponse; // error uncaught reference error: inResponse not defined
this.$.list.render();
},
When I click on inReply on my chrome debugger it says
Object:
Comments: Array[3]
How can it say it is not define, if the watch window shows it as
Object:
Comments: Array[3]
The code in your question mixes InResponse
(capital I
) and inResponse
(lowercase i
). Assuming this is what your real code looks like, change
this.serverReply = InResponse;
to
this.serverReply = inResponse;