SELECT d.name,
{d.id, d.items} AS details,
{d.country_name, d.country_code} AS country
FROM default AS d
WHERE .....;
If you want change name inside object {"name": d.country_name, "code": d.country_code} AS country
{d.id, d.items, “cnt”: ARRAY_COUNT(ARRAY true FOR v IN d.sellers WHEN … END) }
During OBJECT construction , it requires fieldname:value pair. If the expression is is identifier it will inherits filedname from expression. If not user has to supply filedname:expression.