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

> ينشئ new table مميزة كـ JSON array من أجل json.encode، وينسخ sequence من 1.#source عند توفير source table.

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

  ## الوسائط

  <ParamField path={"source"} type={"table"}>
    Optional source table. عند الحذف أو nil، يعيد json.array new empty array-marked table. عند توفيرها، يتم نسخ numeric sequence entries فقط من 1 with #source إلى new table.
  </ParamField>

  ## القيم الراجعة

  <ResponseField name={"array"} type={"table"}>
    New table مع JSON array marker. json.encode يقوم serializes لها كـ JSON array؛ original source table لا يتم إرجاعها.
  </ResponseField>

  ## مثال

  انشئ array-marked copy حتى يقوم json.encode بعمل serialize للقيمة كـ 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>
