title: Fill struct dynamically from parameters
body: <p>I've the following struct which works as expected Im getting 
  data and I was  able </p>
  
  <pre><code>type Service struct {
      Resources    []struct {
          Model struct {
              Name                string `json:"name"`
              Credentials         struct {
                  path string `json:"path"`
                  Vts struct {
                      user string `json:"user"`
                      id    string `json:"id"`
                      address      string `json:"address"`
                  } `json:"vts"`
              } `json:"credentials"`
          } `json:"model"`
      } `json:"resources"`
  }
  
  service:= Service{}
  err := json.Unmarshal([]byte(data), &amp;service
  </code></pre>
  
  <p>The data is like following, </p>
  
  <p>service1</p>
  
  <pre><code>{
      "resources": [
          "model": {
            "name": "cred",
            "credentials": {
              "path": "path in fs",
              "vts": {
                "user": "stephane", 
                "id": "123",
                "address": "some address"
              }
            },
          }
        },
  </code></pre>
  
  <p>Now some services providing additional data under vts for example now we have 3 fields (user/id/address) but some services (service1) can provides additional data like email, secondName ,etc . but the big problem here is that 
  I need to get it from parameters since (service 2) education, salary etc</p>
  
  <p>Service2 </p>
  
  <pre><code>{
      "resources": [
          "model": {
            "name": "cred",
            "credentials": {
              "path": "path in fs",
              "vts": {
                "user": "stephane",
                "id": "123",
                "address": "some address",
                "email" : "some email",
                "secondName" : "secondName"
              }
            },
          }
        },
  </code></pre>
  
  <p>service N</p>
  
  <pre><code>{
      "resources": [
          "model": {
            "name": "cred",
            "credentials": {
              "path": "path in fs",
              "vts": {
                "user": "stephane",
                "id": "123",
                "address": "some address",
                "salary" : "1000000"
              }
            },
          }
        },
  </code></pre>
  
  <p>Of course If I know <strong>in advance</strong> the fields I can put them all in the struct and use <code>omitempty</code> <strong>but I dont know, I just get it as parameter to the function</strong> (the new properties names) , some service can provide 10 more fields in this struct (which I should get the properties name of them as <code>args[]</code>to the functions) but I don't know them in advance, this should be dynamic somehow ....is there a nice way to handle it in Golang ? </p>