ng, Any?&gt;</code> and return an instance of a certain type. Those requirements fit perfectly with a <code class="lang-kotlin">Map</code>-delegated class.</p><div class="sample-container"><pre><code class="block lang-kotlin" theme="idea">class User(map: Map&lt;String, Any?&gt;) {<br>    val name: String by map<br>    val surname: String by map<br>    val age: Int by map<br>}<br><br>val users: List&lt;User&gt; = query.execute().toObjects(::User)<br><br>val usersFlow: Flow&lt;List&lt;User&gt;&gt; = query.asO