Function

judo_first

First array element.

Since v1.0
judo_value *judo_first(
judo_value *value)

Parameters 🔗

value in

Array value.

Return Value 🔗

The first element of the array or NULL if value is NULL, not an array, or an empty array.

Discussion 🔗

The judo_first function retrieves the first element of value, which must be an array. If value is NULL, not an array, or is an empty array, then NULL is returned. Check if value is an array with judo_gettype and non-empty with judo_len.