Select data from JSON in nested data

Hey @NickJ, welcome to the community :hugs:

Couldn't get it to work with AlaSQL (which is what the "Query JSON with SQL" query uses). Try a transformer in the meantime:

const output = data.map(x => {
  return {
    name: x.name, 
    age: x.age,
    roles: x.roles.map(x => {return x.name}).join(", ")
  }
})

return output
1 Like