Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
mongodb から JSON データを取得しています。その variable をアラートすると、結果が「オブジェクト オブジェクト」として表示されます。ここで、「オブジェクト オブジェクト」の正確な値を表示したいと考えています。どうすればそれができますか...?JSON.stringify()....以外のソリューションを提案できますか?
連想配列として使用されているオブジェクトは、次を使用して反復できます。
for (var key in thevar) { console.log(key + ": " + thevar[key]); }
次のような出力が生成されます。
_id: 793fdda7-3f2d-48c8-8e82-f2471f411d24 tag: example ram: 8kb