Can the value of the key-value pair returned by aggregate operations in MongoDB be extracted?

This is a code that attempts to get the highest brand average price.

var x = db.inventory.aggregate([
{$match:{'Origin':'USA'}},
{$group:{_id:'$Brand', top_avgprice:{$avg:'$Price'}}},
{$project: {_id:0,top_avgprice:1}},
{$sort: {top_avgprice:-1}},
{$limit:1}
])

Printing x returns a key-value pair, e.g. top_avgprice: 10,000

But when I try to access the value by doing the code below, it returns nothing.

x.top_avgprice

How do I return that 10,000 alone? I'll need this integer value later for another expression.