Home  >  Forum  >  Angular
Post New Query

json file to typescript how to print?



Asked on November 09, 2017
 I have array of

 "teams": [
        {
          "id": 33,
          "typeid": 2,
          "deleted_at": null,
          "created_at": "2017-01-13 20:18:05",
          "updated_at": "2017-09-18 10:57:16",
          "status": "active",
          "team_id": 1,
          "pivot": {
            "user_id": 20,
            "client_id": 33
          },



i need only teams-id and client-id how i will get and print.



Replied on November 10, 2017
Create a class as 

export class Team {
   id: number;
   team_id: number;
  -------
}

Acesss JSON using Angular http.get()

Find the sample example.

 



Replied on November 11, 2017
i have 1-100 nos _id but i want to print 10 and 44, then how is it possible?

Write Answer







©2019 concretepage.com | Privacy Policy | Contact Us