---
title: "xpc_array_get_value(_:_:)"
framework: xpc
role: symbol
role_heading: Function
path: "xpc/xpc_array_get_value(_:_:)"
---

# xpc_array_get_value(_:_:)

Returns the value at the specified index in the array.

## Declaration

```swift
func xpc_array_get_value(_ xarray: xpc_object_t, _ index: Int) -> xpc_object_t
```

## Parameters

- `xarray`: The array object which is to be examined.
- `index`: The index of the value to obtain. This value must lie within the range of indexes as specified in doc://com.apple.xpc/documentation/XPC/xpc_array_set_value(_:_:_:).

## Return Value

Return Value The object at the specified index within the array.

## Discussion

Discussion This method does not grant the caller a reference to the underlying object, and thus the caller is not responsible for releasing the object.

## See Also

### Array objects

- [XPCArray](xpc/xpcarray.md)
- [xpc_array_create(_:_:)](xpc/xpc_array_create(_:_:).md)
- [xpc_array_create_empty()](xpc/xpc_array_create_empty().md)
- [xpc_array_create_connection(_:_:)](xpc/xpc_array_create_connection(_:_:).md)
- [xpc_array_set_value(_:_:_:)](xpc/xpc_array_set_value(_:_:_:).md)
- [xpc_array_append_value(_:_:)](xpc/xpc_array_append_value(_:_:).md)
- [xpc_array_get_count(_:)](xpc/xpc_array_get_count(_:).md)
- [xpc_array_apply(_:_:)](xpc/xpc_array_apply(_:_:).md)
- [xpc_array_dup_fd(_:_:)](xpc/xpc_array_dup_fd(_:_:).md)
- [xpc_array_get_array(_:_:)](xpc/xpc_array_get_array(_:_:).md)
- [xpc_array_get_bool(_:_:)](xpc/xpc_array_get_bool(_:_:).md)
- [xpc_array_get_data(_:_:_:)](xpc/xpc_array_get_data(_:_:_:).md)
- [xpc_array_get_date(_:_:)](xpc/xpc_array_get_date(_:_:).md)
- [xpc_array_get_dictionary(_:_:)](xpc/xpc_array_get_dictionary(_:_:).md)
- [xpc_array_get_double(_:_:)](xpc/xpc_array_get_double(_:_:).md)
