Published
Edited
Feb 14, 2021
Insert cell
Insert cell
Insert cell
table = aq.toArrow([
{ s: { a: 1, b: 'a' } },
{ s: { a: 2, b: 'b' } },
{ s: { a: 3, b: 'c' } }
])
Insert cell
table.schema.fields[0].type // is struct-typed? (yes)
Insert cell
table.schema.fields[0].type.typeId === Arrow.Type.Struct // type id matches, too
Insert cell
[...table] // table maps to an array of Maps
Insert cell
[...table.getColumn('s')] // struct column also maps to Maps
Insert cell
table.getColumn('s').get(0) instanceof Map // check column value instance
Insert cell
table.getColumn('s').get(0).get('a') // is a Map
Insert cell
table.getColumn('s').get(0)['a'] // is also a Proxy
Insert cell
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more