Handling of Querysets/Converting to Text

I know, to the Pro’s this will come probably as a joke but for beginners sometimes the most simple thing are confusing…

so if i have something like this:

header = Employees.objects.filter(id=request.POST['id']).values('last_name')

How can i achieve to make the output the last_name ONLY and not

<Queryset [{‘last_name’:‘XXXXXXX’}]>?

QuerySet.get() returns a single object:

header = Employees.objects.get(id=request.POST['id']).last_name

or raises DoesNotExist.

Thx, made my day :slight_smile: somehow i knew the solution must be simple :stuck_out_tongue:

You made my day too! So simple yet elusive. Thx!