IronJSON.JSONManager.Exists C# (CSharp) Method

Exists() public method

public Exists ( object key ) : bool
key object
return bool
        public bool Exists(object key)
        {
            if (key is int && m_cd.Type == ValueType.Array)
            {
                return (int)key >= 0 && (int)key < m_cd.Array.Count;
            }
            else if (key is string && m_cd.Type == ValueType.Object)
            {
                return m_cd.Obj.ContainsKey((string)key);
            }
            else
                throw new InvalidKeyException(key.ToString());
        }