### Method

# Json Node init_array

since: 0.16

#### Declaration [src]

    JsonNode*
    json_node_init_array (
      JsonNode* node,
      JsonArray* array
    )

#### Description [src]

Initializes `node` to `JSON_NODE_ARRAY` and sets `array` into it.

This function will take a reference on `array`.

If the node has already been initialized once, it will be reset to the given type, and any data contained will be cleared.

Available since: 0.16

#### Parameters

`array`

  Type: `JsonArray`

  The JSON array to initialize `node` with, or `NULL`.

  The argument can be `NULL`.
  The data is owned by the caller of the method.

#### Return value

Type: `JsonNode`

The initialized node.

The returned data is owned by the instance.