array[1]
does not give you the first item in an array, it gives you the second item. Javascript arrays start counting at 0. If you truly want the first item in an array like queryResult.records
, you need queryResult.records[0]
.
Are you trying to get “a record from a cell”, “a cell from a record”, or “a record from a linked-records cell of another record”?
When pulling records from a table, the easiest way to guarantee the order of records in a predictable manner is to query records from a specific view within the table, not the table. At table-level, record order may-or-may-not-be arbitrary. At view-level, record order is constant.