How can I read this JSON into a (breakable) table(x)

#let data = json("data.json")
#let i = 0
#table(
  columns: 3,
  ..for server in data {
    (
      table.cell(colspan: 3, server.at(0)),
      ..for login in server.at(1) {
        i = i + 1
        (
          [#i],
          login.User,
          login.Password,
        )
      },
    )
  }
)

This makes use of the fact that if all iterations of a for-loop produce arrays, then the for-loop itself evaluates to the concatenation of these arrays, which we then can spread using ..

2 Likes