#Share Prompt Project with NextJS 13 - MongoDB issue

19 messages · Page 1 of 1 (latest)

frank bone
#

I'm trying to fetch the post (prompts) message from mongodb and it should append creator details to each post using the populate() method. But when I try to console log the object that I'm receiving back, it doesn't have the creator details fetched from referencing user model.

I'm attaching the prompt api to send the details of prompts as well as the user and prompt models.

boreal ocean
#

/run js

const jsonStruct = { message: "Hello", status: 200 };

console.log(JSON.stringify(jsonStruct))```
ebon lindenBOT
#

Here is your js(18.15.0) output @boreal ocean

{"message":"Hello","status":200}
frank bone
frank bone
boreal ocean
#

Open the > in [[Prototype]]

#

You'll see the keys there

frank bone
#

this?

boreal ocean
#

mhm

#

yes

frank bone
#

so any ideas?

boreal ocean
#

mhm not really

frank bone
#

Welp, thanks for trying