How to index values from Record Type.
For Example:
how to index location from this
Discussion posts and replies are publicly visible
As per the index function definition it should accepts the record list for data parameter, however interestingly it does not work.
index(data, index, default)
Returns: List
data (Any Type): A homogeneous array, whose indexed value is expected. Can also be a dictionary, map, CDT, or Record.
default (Any Type): The default value to be returned if the data or the index is invalid, e.g. if the data itself is empty or the index is not found in the data. The type of the default value must be same as that of elements of the data.