I am getting this response from an angular service:
response.data
events: Array(1)
0:
ingestionTime: 1560362454013
message: "{"server":"xxx.xxx","errorName":"HelloWorldError","error":"hello error"}"
timestamp: 1560362450917
I save this response as:
$scope.accounts = response.data;
When printing in the html, nothing is displayed on the screen:
<tr ng-repeat="event in accounts.events track by $index">
<td>{{event.message[1].errorName}}</td>
</tr>
When I print like
{{event.message}} //it displays whole json string
But I need to access the json properties of message property like:
{{event.message.errorName}} //this is not priinting anything
{{event.message[1].errorName}} //this is not priinting anything
Anybody could give me some advice, i am new to angularJS :(?
If each message is JSON string, they can be parsed to JavaScript objects:
Then display with: