Posts in "Uncategorized"

Calculate the Average Value for a Field Inside an Array with MongoDB

In this post, you will learn how to use MongoDB queries and calculate the average value for fields inside an array sub-document. The document model We will use a lego model for this example. The lego set document has a reviews property. Each review has a rating score. Let’s take a look at what we… Continue reading