Я получаю сообщение об ошибке TypeError: unhashable type: 'dict'
, когда пытаюсь использовать $concat
в своем запросе на пимонго
Моя схема:
{'tags': {'variables': [{'value': '3x9', 'var_name': 's'},
{'value': '12:00AM', 'var_name': 'x'},
{'value': 'goog', 'var_name': 'y'}]},
'url': 'https://www.google.com'}]
Мой запрос:
res = mycol.aggregate([
{ '$unwind': '$tags' },
{ '$match': {
'tags.tag.name':'A A',
'AR': 12345
}
},
{
'$project': {
{ 'itemDescription': { '$concat': [ "$item", " - ", "$description" ] } }
, '_id': 0
}
}
])
Что я делаю не так?