# Command: keys

NEST HelpDesk | Command Index | NEST Quick Reference

Name:

    keys - Return array of keys in a dictionary

Synopsis:

      dict keys -> array
      <</key1 val1 ... /keyn valn>> keys -> [/key1 ... /keyn]

Examples:

      << /a 1 /b 2>> keys -> [/a /b]

Description:

      "keys" converts the keys in a given dictionary to an array.
      The order of elements is the same as for the "values" command.

Parameters:

      dict is a dictionary which may be empty

Diagnostics:

      no errors are issued.

Remarks:

      The commands "keys" and "values" return the same order of
      elements, when applied to the same dictionary. Apart from that,
      there is no particular order of elements in the returned array.

Author:

    Ruediger Kupper

      First Version: 27-jun-2008

SeeAlso:

- keys
- values
- <<>>
- cva
- cvdict

Source:

    /opt/conda/conda-bld/nest_1510212701067/work/nest-2.14.0/sli/slidict.cc

NEST HelpDesk | Command Index | NEST Quick Reference

© 2004 The NEST Initiative