Monday, 30 September 2013

Getting value from mysql result array

Getting value from mysql result array

I'm having problem getting a value from array contains json. Here is the
JSON i'm getting (printed by console.log(rows[0]) ) :
[ { User_ID: 28,
Email: 'bla1111@s.com'} ]
But when trying to print the User_ID or Email:
console.log(rows[0].User_ID)
The output is undefined.
What am I doing wrong ?

No comments:

Post a Comment