Start a conversation

How are grid field values and checkbox values retrieved from the API?


Grid field values are stored as so-called JSON objects. A JSON object looks like this:


In this case, the grid field consists of 2 rows, numbered 0 and 1 (outside the inner brackets), and two columns, also numbered 0 and 1 (inside the inner brackets). For the case above, the grid would look like this in Castor:

See also our article on calculating with grids.

This is because a grid is seen as one field, and all values of the grid cells need to be saved within that one field. Since the API retrieves the 'raw' data directly from the database, grid values will be retrieved in JSON format as well.  It is possible to convert a JSON object into a dataframe in R with the jsonlite package.


For checkbox fields all option values that are checked are saved in the field value, separated by a semicolon. For example, see the field below.

The option group of the field looks like this:

Since the first two options with the values 1 and 2 are selected, the field value is saved as, and will be retrieved from the API like this:

Choose files or drag and drop files
Was this article helpful?
  1. Castor Support Team

  2. Posted
  3. Updated