我在expressjs簡單的中間件發送多對象響應由expressjs
app.get("/" , function(req , resp , next){
/* object 1 with data */
var obj1 = [
{"name":"linda","family":"kamelia"},
{"name":"ama","family":"kandi"},
{"name":"lucy","family":"lofa"}
];
/* object 2 with data */
var obj2 = [
{"name":"kama","family":"kambril"},
{"name":"soli","family":"sepani"},
{"name":"sara","family":"fani"}
];
resp.send("First: " + obj1 + "<br> Secoud: " + obj2);
});
它告訴我這個結果輸出:
First: [object Object],[object Object],[object Object]
Secoud: [object Object],[object Object],[object Object]
我怎麼能在輸出響應打印真實數據?