const JOBS_QUERY = groq`*[ _type == "job" && defined(slug.current)]|order(title, description)[0...12]{_id, title, description, department, open, slug}`;
const { data: jobs, error } = await useAsyncData(JOBS_QUERY, () => useSanityQuery<SanityDocument[]>(JOBS_QUERY));if (error.value) { throw createError({ statusCode: 500, statusMessage: `Failed to fetch jobs`, })}
[nuxt] [request error] [unhandled] [500] Cannot stringify a function
Property 'filter' does not exist on type '_AsyncData<SanityDocument[] | null, Error>'
const handleSearch = () => { results.value = jobs?.value?.filter((job: SanityDocument) => Object.values(job).some((value) => value.toString().toLowerCase().includes(search.value.toLowerCase())) ) || [];};