Spec-Zone.ru › ColdFusion

structKeyExists

Determines whether a specific key is present in a structure.

structKeyExists(structure, key) → returns boolean

Member Function Syntax

struct.keyExists(key)

  • CF
  • Lucee
  • BL 1.0.0+
  • See Also: isDefined isEmpty

    Argument Reference

    structure struct
    Required

    Name of structure to test

    key string
    Required

    Key to test

    Examples
    Sample code invoking the structKeyExists function

    Check if server struct has OS key

    structKeyExists(server, "os")

    Expected Result: YES

    Check if server struct has OS key using member function

    CF 11+ calling the keyExists member function on a struct.

    server.keyExists("os")

    Expected Result: YES

    © 2012–present Foundeo, Inc. and the CFDocs contributors.
    Licensed under the MIT License.
    ColdFusion is a trademark of Adobe Systems Incorporated.
    https://cfdocs.org/structkeyexists

    Spec-Zone.ru

    Настройки Оффлайн Что нового Помощь О нас
    Spec-Zone .ru
    спецификации, руководства, описания, API