Reputation: 1
I am currently working on a full stack project using asp.net and angularjs.I have written this code to get output response from the Swagger API. (https://i.sstatic.net/vLyIE.png) I have done the API designing through ASP. Net. (https://i.sstatic.net/DQkHS.png)
I want to know how I can fetch the details under "data". What should be the code for this?
Please help me with the code to display the details under "data" in the response i.e., id, created Date etc.
Upvotes: 0
Views: 186
Reputation: 21
I would define a variable that is equal to the response data as such
const data = successResponse.data;
then you could map over the data using data.map(val => { // do something with the value })
Or you could run a for loop, or execute the forEach method.
Upvotes: 2