Working with records
Records are a structure that allows for the organization of data in fields; each field is a name-value pair. Similar to lists, records can store various data types and offer capabilities for data manipulation, extraction, and modification.
While there is only a modest collection of record functions available in the M language compared to lists or tables, there are functions that accept a record as an argument or return a record as output. This section will cover common aspects of working with records. Again, it’s important to mention that our focus is on working with records, and we will discuss working with mixed data structures later in this chapter.
Transforming records
Every field value within a record can be referred to by its field name – a unique identifier within the record. A method known as field access
provides access to each field value by using that name within a set of square brackets, [ ]
.
The M language includes a...