> ## 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.array

> Tao new table duoc danh dau la JSON array cho json.encode, sao chep sequence 1.#source khi co source table.

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

  ## Đối số

  <ParamField path={"source"} type={"table"}>
    Optional source table. Khi bo qua hoac nil, json.array tra ve new empty array-marked table. Khi duoc cung cap, chi numeric sequence entries tu 1 with #source duoc sao chep vao new table.
  </ParamField>

  ## Giá trị trả về

  <ResponseField name={"array"} type={"table"}>
    New table voi JSON array marker. json.encode serializes no thanh JSON array; original source table khong duoc tra ve.
  </ResponseField>

  ## Ví dụ

  Tao array-marked copy de json.encode serializes gia tri thanh JSON array.

  ```lua theme={null}
  local tags = json.array({ "api", "docs", "luau" })
  local empty = json.array()

  print(json.encode(tags))
  print(json.encode(empty))
  print(json.type(empty))
  ```
</div>
