Please join both calls `results = map(lambda r: {'value': r.term})` and remove the semicolon `;`