Simply include the UserData into the SecretUser struct and do not specify a json tag for it.
type UserInfo struct { FirstName string `json:"firstName"` LastName string `json:"lastName"` Email string `json:"email"` } type SecretUser struct { UserInfo Password string `json:"password"` } func main() { data := []byte(`{"firstName": "nice","lastName":"guy","email":"[email protected]","password":"abc123"}`) var u SecretUser _ := json.Unmarshal(data, &u) fmt.Println(u) }