title: Update specific value in structure
body: <p>I can't seem to find out how to update a specific value in a structure in Swift 4. I have this structure:</p>
  
  <pre><code>struct Export: Decodable {
      let id: String
      let name: String
      let exportType: String
  }
  </code></pre>
  
  <p>It is filled with values I got from a JSON.<br>
  I was using JSONDecoder </p>
  
  <pre><code>self.Exp = try JSONDecoder().decode([Export].self, from: data!)
  </code></pre>
  
  <p>Now I'm receiving a new JSON only containing an id.<br>
  I want to update the id of this structure with the new value.<br>
  The JSON sends a response like that : </p>
  
  <pre><code>{
      "id": "70CD044D290945BF82F13C13B183F669"
  }
  </code></pre>
  
  <p>So even when I try to save it in a separate structure I get this error</p>
  
  <pre><code>dataCorrupted(Swift.DecodingError.Context(codingPath: [], 
  debugDescription: "The given data was not valid JSON.", 
  underlyingError: Optional(Error Domain=NSCocoaErrorDomain Code=3840 
  "JSON text did not start with array or object and option to allow fragments not set."
  UserInfo={NSDebugDescription=JSON text did not start with array or object and option to allow fragments not set.})))
  </code></pre>
  
  <p>I tried to look for solutions before posting but I couldn't find any I'm pretty new to JSON handling and Swift... </p>