[Answered ]-Django filter exact value in list

1👍

I think you’re wanting something like this:

  1. Filter JobsConditions by condition__id and get the associated job_item__jobs as a list:
jobs_list = (JobsConditions.objects
    .filter(condition__id__in=cond_array)
    .values_list('job_item__jobs', flat=True))
  1. Filter Jobs by that jobs_list:
jobs = Jobs.objects.filter(jobs__in=jobs_list)
👤tdy

Leave a comment