uage-javascript>var users = [
    {id: 1, name: &quot;John&quot;},
    {id: 2, name: &quot;Mary&quot;},
]

function userInputs(users) {
    return users.map(function(u) {
        return m(&quot;input&quot;, {key: u.id}, u.name)
    })
}

m.render(document.body, userInputs(users))</code></pre>
<p>Having a key means that if the <code>users</code> array is shuffled and the view is re-rendered, the inputs will be shuffled in the exact same order, so as to maintain correct focus and DOM state.</p>
<p>To learn mo