SupabaseS
Supabase4y ago
deed

Returning many to many object as just an array and not nested element

I was wondering if there's any way to select from a many to many relationship and return just the nested child without it being in an object? Heres an example:

const { data, error } = await supabase .from("show") .select("show_promotion(*)") .eq("id", showId as string) .single();

This returns data: {show_promotion: [obj1, obj2, etc.]

Can I get it to just return data: [obj1, obj2, etc.] ?
Was this page helpful?