How i can select the count(user)
from the tab
object?
var tab =
[
{ id: '1', 'count(user)': 11 },
{ id: '2', 'count(user)': 31 },
{ id: '3', 'count(user)': 3 }
]
This prints 2
:
console.log(tab[1].id)
but this gives me an error:
console.log(tab[1].count(user))
ReferenceError: user is not defined
How can I fix this?