title: Update/change array value of custom object- swift
body: <p>I have a custom <code>model</code> like bellow:</p>
  
  <pre><code>struct ContentModel {
      var id: Int64?
      var parentID: Int64?
      var subject: String?
      var langId: String?
      var isSelected: String?
      var identifier: String?
      var title: String?
      var count: Int64?
      var selectAll: String?
      var textSelectAll: String?
  }
  </code></pre>
  
  <p>And:  </p>
  
  <pre><code>struct SectionModel {
      var expand:Bool
      var title:String
      var content:[ContentModel]
  }
  </code></pre>
  
  <p>How can I update a specific item from above model?</p>
  
  <p>I am using from bellow code:</p>
  
  <pre><code>for resRoot in  displayListCourseFilter{
      for resSub in resRoot.content{
          if pId == resSub.parentID{
              resSub.selectAll = "true"
              resSub.isSelected = "true"
          }
      }
  }
  </code></pre>
  
  <p>But say me:</p>
  
  <pre><code>Cannot assign to property: 'resSub' is a 'let' constant
  </code></pre>
  
  <p>NOTICE: All of my variables are <code>var</code>.</p>