title: how to populate class/model with JSON data in angular2
body: <p>I have a json data which is coming from service but currently i have created a mock json data.
  Requirement : I want to populate this data into my class. Could someone suggest how the architecture of class should be and how to populate/map the data from JSON to class.</p>
  
  <p>JSON Data</p>
  
  <pre><code>export const Data =
  {
      "elements": [
          {
              "name": "stringVal",
              "facets": [
                  {
                      "name": "Cameras",
                      "link": {
                          "type": "Link",
                          "uri": 
                      },
                      "hits": {
                          "type": "Link",
                          "uri": 
                      },
                      "selected": true
                  },
                  {
                      "name": "Cameras2",
                      "link": {
                          "type": "Link2",
                          "uri": 
                      },
                      "hits": {
                          "type": "Link2",
                          "uri": 
                      },
                      "selected": false
                  },
  
              ],
              "displayType": "text_clear",
              "selectionType": "taxonomic",
  
          },
          {
              "name": "Brand",
              "facets": [
                  {
                      "name": "Canon",
                      "link": {
                          "type": "Link",
                          "uri": 
                      },
                      "hits": {
                          "type": "Link",
                          "uri": 
                      },
                      "selected": false
                  },
                  {
                      "name": "Canon",
                      "link": {
                          "type": "Link",
                          "uri": 
                      },
                      "hits": {
                          "type": "Link",
                          "uri": 
                      },
                      "selected": false
                  },
              ],
              "displayType": "text_clear",
              "selectionType": "single",
  
          },
      ],
      "type": "stringValue",
      "name": "filters"
  }
  </code></pre>