title: How can I get a value stored inside an NSObject retrieved from Firebase?
body: <p>I am trying to append my <code>Locale</code> custom class that have some properties,</p>
  <pre><code>// here is my locale
      struct Locale: Decodable {
          var nomeLocale: String
          var isActive: Bool
      }
  </code></pre>
  <p>to an array with values retrieved from firebase like so:</p>
  <pre><code>@State var array: [Locale] = []
  
  ref.child(&quot;locali&quot;).child(userID!).observe(.value, with: { snapshot in                        
      guard let value = snapshot.value as? [String : NSObject] else {
          print(&quot;error with the guard first&quot;)
          return
      }
      for locale in value {
          locali.append(Locale(nomeLocale: locale.key, isActive: // here I have to get the nested object )) 
      }
  }
  </code></pre>
  <p>)}</p>
  <p>The data that i receive back from Firebase (the value) is the following:</p>
  <pre><code>[&quot;Pizzeria da Jonny&quot;: {
       isActive = 0;
   }, 
   &quot;Locanda da Pino&quot;: {
       isActive = 1;
   }]
  </code></pre>
  <p>I can successfully retrieve the nomeLocale as shown before this way:</p>
  <pre><code>for locale in value {
      locali.append(Locale(nomeLocale: locale.key /*, isActive: locale.value*/)) 
  }
  </code></pre>
  <p>But the problem (at least for me) is getting the nested property of isActive inside of the <code>value</code> response, I can't just do `locale.value.isActive</p>