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

> Tworzy new table oznaczona jako JSON array dla json.encode, kopiujac sequence 1.#source, gdy podano source table.

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

  ## Argumenty

  <ParamField path={"source"} type={"table"}>
    Optional source table. Gdy pominieta lub nil, json.array zwraca new empty array-marked table. Gdy podana, tylko numeric sequence entries od 1 with #source sa kopiowane do new table.
  </ParamField>

  ## Zwroty

  <ResponseField name={"array"} type={"table"}>
    New table z JSON array marker. json.encode serializes ja jako JSON array; original source table nie jest zwracana.
  </ResponseField>

  ## Przykład

  Utworz array-marked copy, aby json.encode serializes wartosc jako 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>
