Fetch Keys And Values

There are several methods available for retrieving keys and values from data2d and data3d objects. It is highly recommended to utilize these methods instead of directly accessing the objects. These methods are specifically designed to handle various internal functionalities and encapsulate the full capabilities of these data structures.

When dealing with a data3d object, which stores data using primary keys and data keys, there are three main ways to retrieve data: fetching all data associated with a primary key, retrieving all data associated with a data key, or obtaining a single data point associated with both keys. To simplify this process, most methods have prefixes like pk (for primary key) or dk (for data key). This naming convention helps streamline method usage.

keys()

The keys() method allows you to retrieve all the keys from a data2d object. If the object is sorted, this method will ensure that the keys are returned in the proper sorted order.

  • Name
    this
    Type
    data2d
    Description

    A data2d object.

  • Name
    returns
    Type
    array<string>
    Description

    A string array.


primaryKeys()

The primaryKeys() method allows you to retrieve all the primary keys from a data3d object. If the object is sorted, this method will ensure that the primary keys are returned in the proper sorted order.

  • Name
    this
    Type
    data3d
    Description

    A data3d object.

  • Name
    returns
    Type
    array<string>
    Description

    A string array.


dataKeys()

The dataKeys() method allows you to retrieve all the data keys from a data3d object.

  • Name
    this
    Type
    data3d
    Description

    A data3d object.

  • Name
    returns
    Type
    array<string>
    Description

    A string array.


values()

Get all values in string representation. Formatted and sorted, if applicable.

  • Name
    this
    Type
    data2d
    Description

    A data2d object.

  • Name
    alt
    Type
    bool
    Description

    Set to true to obtain the alternate values instead. Optional. The default is false.

  • Name
    returns
    Type
    array<string>
    Description

    A string array.


pkValues()

Get all values from the primary key in string representation. Formatted and sorted, if applicable.

  • Name
    this
    Type
    data3d
    Description

    A data3d object.

  • Name
    primaryKey
    Type
    string
    Description

    A primary key.

  • Name
    returns
    Type
    array<string>
    Description

    A string array.


dkValues()

Get all values from the data key in string representation. Formatted, if applicable.

  • Name
    this
    Type
    data3d
    Description

    A data3d object.

  • Name
    dataKey
    Type
    string
    Description

    A data key.

  • Name
    returns
    Type
    array<string>
    Description

    A string array.


stringValues()

Get all string values. Sorted, if applicable.

  • Name
    this
    Type
    data2d
    Description

    A data2d object.

  • Name
    alt
    Type
    bool
    Description

    Set to true to obtain the alternate values instead. Optional. The default is false.

  • Name
    returns
    Type
    array<string>
    Description

    A string array. For keys with all other data types, array item will be na.


pkStringValues()

Get all string values from the primary key. Sorted, if applicable.

  • Name
    this
    Type
    data3d
    Description

    A data3d object.

  • Name
    primaryKey
    Type
    string
    Description

    A primary key.

  • Name
    returns
    Type
    array<string>
    Description

    A string array. For keys with all other data types, array item will be na.


dkStringValues()

Get all string values from the data key.

  • Name
    this
    Type
    data3d
    Description

    A data3d object.

  • Name
    dataKey
    Type
    string
    Description

    A data key.

  • Name
    returns
    Type
    array<string>
    Description

    A string array. For keys with all other data types, array item will be na.


floatValues()

Get all float values. Sorted, if applicable.

  • Name
    this
    Type
    data2d
    Description

    A data2d object.

  • Name
    alt
    Type
    bool
    Description

    Set to true to obtain the alternate values instead. Optional. The default is false.

  • Name
    returns
    Type
    array<float>
    Description

    A float array. For keys with all other data types, array item will be na.


pkFloatValues()

Get all float values from the primary key. Sorted, if applicable.

  • Name
    this
    Type
    data3d
    Description

    A data3d object.

  • Name
    primaryKey
    Type
    float
    Description

    A primary key.

  • Name
    returns
    Type
    array<float>
    Description

    A float array. For keys with all other data types, array item will be na.


dkFloatValues()

Get all float values from the data key.

  • Name
    this
    Type
    data3d
    Description

    A data3d object.

  • Name
    dataKey
    Type
    float
    Description

    A data key.

  • Name
    returns
    Type
    array<float>
    Description

    A float array. For keys with all other data types, array item will be na.


intValues()

Get all integer values. Sorted, if applicable.

  • Name
    this
    Type
    data2d
    Description

    A data2d object.

  • Name
    alt
    Type
    bool
    Description

    Set to true to obtain the alternate values instead. Optional. The default is false.

  • Name
    returns
    Type
    array<int>
    Description

    An integer array. For keys with all other data types, array item will be na.


pkIntValues()

Get all integer values from the primary key. Sorted, if applicable.

  • Name
    this
    Type
    data3d
    Description

    A data3d object.

  • Name
    primaryKey
    Type
    int
    Description

    A primary key.

  • Name
    returns
    Type
    array<int>
    Description

    An integer array. For keys with all other data types, array item will be na.


dkIntValues()

Get all integer values from the data key.

  • Name
    this
    Type
    data3d
    Description

    A data3d object.

  • Name
    dataKey
    Type
    int
    Description

    A data key.

  • Name
    returns
    Type
    array<int>
    Description

    An integer array. For keys with all other data types, array item will be na.


boolValues()

Get all boolean values. Sorted, if applicable.

  • Name
    this
    Type
    data2d
    Description

    A data2d object.

  • Name
    alt
    Type
    bool
    Description

    Set to true to obtain the alternate values instead. Optional. The default is false.

  • Name
    returns
    Type
    array<bool>
    Description

    A boolean array. For keys with all other data types, array item will be na.


pkBoolValues()

Get all boolean values from the primary key. Sorted, if applicable.

  • Name
    this
    Type
    data3d
    Description

    A data3d object.

  • Name
    primaryKey
    Type
    bool
    Description

    A primary key.

  • Name
    returns
    Type
    array<bool>
    Description

    A boolean array. For keys with all other data types, array item will be na.


dkBoolValues()

Get all boolean values from the data key.

  • Name
    this
    Type
    data3d
    Description

    A data3d object.

  • Name
    dataKey
    Type
    bool
    Description

    A data key.

  • Name
    returns
    Type
    array<bool>
    Description

    A boolean array. For keys with all other data types, array item will be na.


colorValues()

Get all color values. Sorted, if applicable.

  • Name
    this
    Type
    data2d
    Description

    A data2d object.

  • Name
    alt
    Type
    bool
    Description

    Set to true to obtain the alternate values instead. Optional. The default is false.

  • Name
    returns
    Type
    array<color>
    Description

    A color array. For keys with all other data types, array item will be na.


pkColorValues()

Get all color values from the primary key. Sorted, if applicable.

  • Name
    this
    Type
    data3d
    Description

    A data3d object.

  • Name
    primaryKey
    Type
    color
    Description

    A primary key.

  • Name
    returns
    Type
    array<color>
    Description

    A color array. For keys with all other data types, array item will be na.


dkColorValues()

Get all color values from the data key.

  • Name
    this
    Type
    data3d
    Description

    A data3d object.

  • Name
    dataKey
    Type
    color
    Description

    A data key.

  • Name
    returns
    Type
    array<color>
    Description

    A color array. For keys with all other data types, array item will be na.


timestampValues()

Get all unix timestamp values. Sorted, if applicable.

  • Name
    this
    Type
    data2d
    Description

    A data2d object.

  • Name
    alt
    Type
    bool
    Description

    Set to true to obtain the alternate values instead. Optional. The default is false.

  • Name
    returns
    Type
    array<timestamp>
    Description

    An integer array with unix timestamp values. For keys with other than timestamp data types, array item will be na.


pkTimestampValues()

Get all unix timestamp values from the primary key. Sorted, if applicable.

  • Name
    this
    Type
    data3d
    Description

    A data3d object.

  • Name
    primaryKey
    Type
    string
    Description

    A primary key.

  • Name
    returns
    Type
    array<timestamp>
    Description

    An integer array with unix timestamp values. For keys with other than timestamp data types, array item will be na.


dkTimestampValues()

Get all unix timestamp values from the data key.

  • Name
    this
    Type
    data3d
    Description

    A data3d object.

  • Name
    dataKey
    Type
    string
    Description

    A data key.

  • Name
    returns
    Type
    array<timestamp>
    Description

    An integer array with unix timestamp values. For keys with other than timestamp data types, array item will be na.


get()

Get a single value in string representation for the specified key(s), formatted, if applicable.

  • Name
    this
    Type
    object
    Description

    A data2d or a data3d object.

  • Name
    key
    Type
    string
    Description

    A key identifier. This parameter is only available with data2d object; not available for data3d.

  • Name
    primaryKey
    Type
    string
    Description

    A data3d primary key. This parameter is only available with data3d object; not available for data2d.

  • Name
    dataKey
    Type
    string
    Description

    A data3d data key. This parameter is only available with data3d object; not available for data2d.

  • Name
    alt
    Type
    bool
    Description

    Set to true to obtain the alternate values instead. Optional. The default is false.

  • Name
    returns
    Type
    string
    Description

    A string value.


getString()

Get the string value for the specified key(s).

  • Name
    this
    Type
    object
    Description

    A data2d or a data3d object.

  • Name
    key
    Type
    string
    Description

    A key identifier. This parameter is only available with data2d object; not available for data3d.

  • Name
    primaryKey
    Type
    string
    Description

    A data3d primary key. This parameter is only available with data3d object; not available for data2d.

  • Name
    dataKey
    Type
    string
    Description

    A data3d data key. This parameter is only available with data3d object; not available for data2d.

  • Name
    alt
    Type
    bool
    Description

    Set to true to obtain the alternate values instead. Optional. The default is false.

  • Name
    returns
    Type
    string
    Description

    A string value, or na for other data type.


getFloat()

Get the float value for the specified key(s).

  • Name
    this
    Type
    object
    Description

    A data2d or a data3d object.

  • Name
    key
    Type
    string
    Description

    A key identifier. This parameter is only available with data2d object; not available for data3d.

  • Name
    primaryKey
    Type
    string
    Description

    A data3d primary key. This parameter is only available with data3d object; not available for data2d.

  • Name
    dataKey
    Type
    string
    Description

    A data3d data key. This parameter is only available with data3d object; not available for data2d.

  • Name
    alt
    Type
    bool
    Description

    Set to true to obtain the alternate values instead. Optional. The default is false.

  • Name
    returns
    Type
    float
    Description

    A float value, or na for other data type.


getInt()

Get the integer value for the specified key(s).

  • Name
    this
    Type
    object
    Description

    A data2d or a data3d object.

  • Name
    key
    Type
    string
    Description

    A key identifier. This parameter is only available with data2d object; not available for data3d.

  • Name
    primaryKey
    Type
    string
    Description

    A data3d primary key. This parameter is only available with data3d object; not available for data2d.

  • Name
    dataKey
    Type
    string
    Description

    A data3d data key. This parameter is only available with data3d object; not available for data2d.

  • Name
    alt
    Type
    bool
    Description

    Set to true to obtain the alternate values instead. Optional. The default is false.

  • Name
    returns
    Type
    int
    Description

    An integer value, or na for other data type.


getBool()

Get the boolean value for the specified key(s).

  • Name
    this
    Type
    object
    Description

    A data2d or a data3d object.

  • Name
    key
    Type
    string
    Description

    A key identifier. This parameter is only available with data2d object; not available for data3d.

  • Name
    primaryKey
    Type
    string
    Description

    A data3d primary key. This parameter is only available with data3d object; not available for data2d.

  • Name
    dataKey
    Type
    string
    Description

    A data3d data key. This parameter is only available with data3d object; not available for data2d.

  • Name
    alt
    Type
    bool
    Description

    Set to true to obtain the alternate values instead. Optional. The default is false.

  • Name
    returns
    Type
    bool
    Description

    A boolean value, or na for other data type.


getColor()

Get the color value for the specified key(s).

  • Name
    this
    Type
    object
    Description

    A data2d or a data3d object.

  • Name
    key
    Type
    string
    Description

    A key identifier. This parameter is only available with data2d object; not available for data3d.

  • Name
    primaryKey
    Type
    string
    Description

    A data3d primary key. This parameter is only available with data3d object; not available for data2d.

  • Name
    dataKey
    Type
    string
    Description

    A data3d data key. This parameter is only available with data3d object; not available for data2d.

  • Name
    alt
    Type
    bool
    Description

    Set to true to obtain the alternate values instead. Optional. The default is false.

  • Name
    returns
    Type
    color
    Description

    A color value, or na for other data type.


getTimestamp()

Get the unix timestamp value for the specified key(s).

  • Name
    this
    Type
    object
    Description

    A data2d or a data3d object.

  • Name
    key
    Type
    string
    Description

    A key identifier. This parameter is only available with data2d object; not available for data3d.

  • Name
    primaryKey
    Type
    string
    Description

    A data3d primary key. This parameter is only available with data3d object; not available for data2d.

  • Name
    dataKey
    Type
    string
    Description

    A data3d data key. This parameter is only available with data3d object; not available for data2d.

  • Name
    alt
    Type
    bool
    Description

    Set to true to obtain the alternate values instead. Optional. The default is false.

  • Name
    returns
    Type
    int
    Description

    A unix timestamp value, or na for other data type.