how to flatten returned data from joined tables?

I have a recipes table and instructions table where I store JSON instructions, at the moment I join these tables like this:
  let { data, error, count } = await supabase
    .from('recipes')
    .select(
      `*,
    instructions(instructions)
    `,
      { count: 'exact' }
    )
    .eq('id', id);

But I get the data this way:
ingredients: (2) [{…}, {…}]
instructions: {instructions: '{"root":{"children":[{"children":[{"detail":0,"for…format":"","indent":0,"type":"root","version":1}}'}

How can I flatten my returned data, so that I don't have to call instructions.instructions?
Was this page helpful?