> ## Documentation Index
> Fetch the complete documentation index at: https://docs.projectreal.gg/llms.txt
> Use this file to discover all available pages before exploring further.

# json.keys

> 返回 table 的 visible keys，放入 new table marked as a JSON array。

<div className="real-function-page">
  ```lua theme={null}
  json.keys(object: table): table
  ```

  ## 参数

  <ParamField path={"object"} type={"table"} required>
    要 inspect 的 table。function 要求这个 argument 是 table。
  </ParamField>

  ## 返回值

  <ResponseField name={"keys"} type={"table"}>
    包含 source table keys 的 new array table，不包含 Real JSON type marker。Order 遵循 table iteration iteration，此 function 不会 sorted。
  </ResponseField>

  ## 示例

  将 table 的 visible keys collect 到 new JSON array table。

  ```lua theme={null}
  local record = {
      name = "Real",
      enabled = true,
      [5] = "numeric key",
  }

  for _, key in ipairs(json.keys(record)) do
      print(key)
  end
  ```
</div>
