javascript - display array from nodejs? -


i new in javascript + nodejs

i want display array in javascript nodejs..

this result node.js (i use json.stringify())

[{"id":"i01","name":"jack","phone":"123123"},{"id":"i02","name":"john","phone":"123123"},{"id":"i03","name":"jane","phone":"123123"}]

i want display array this

id | name | phone
---+-------+----------

i01 | jack |123123

i02 | john |123123

i03 | jane |123123

how can achive want ?

thanks

var mypost = [{"id":"i01","name":"jack","phone":"123123"},{"id":"i02","name":"john","phone":"123123"},{"id":"i03","name":"jane","phone":"123123"}]  var mm = mypost[0].id // return i01  var mm1 = mypost[1].name // return john  var mm2 = mypost[2].phone // return 123123(phone3) 

take here check way iterate array: for-each on array in javascript?

hope helps


Comments

Popular posts from this blog

php - Why I am getting the Error "Commands out of sync; you can't run this command now" -

linux - Does gcc have any options to add version info in ELF binary file? -

java - Are there any classes that implement javax.persistence.Parameter<T>? -