I have an array. I converted php array inside JavaScript. I want to get array's name for my select option. How to get array name on console log?
My code is below;
<script>
var users= <?php echo json_encode($users) ?>;
console.log(users);
</script>
[{0: {id:1, name: Alex, email: alex@gmail.com}},
{1: {id:2, name: Jane, email: jane@gmail.com}}]
This is what I get.
But this is what I want.
Alex
Jane
Can you help me please ?