These are chat archives for Automattic/mongoose

26th
Jul 2018
flkeysils
@flkeysils
Jul 26 2018 12:59
I'm trying to insert data from the openweatherapi into my db. Is there a limit to the number of levels that mongoose can populate? I created a schema exactly like openweathermap and I'm just calling the api and inserting the parsed json into the schema: const forecast = new Forecast({
city:{
city_id: weather.city.id,
},
list_main: weather.list
    });
    console.log(forecast.list_main);

  }    
Here's what the output looks like: https://gyazo.com/b816356905efa1f97b75c58ecd115c0d. When I check the weather_main array in a console.log, I get undefined.