JSONArray.Opt(Int32) Method

Definition

Returns the value at index, or null if the array has no value at index.

[Android.Runtime.Register("opt", "(I)Ljava/lang/Object;", "GetOpt_IHandler")]
public virtual Java.Lang.Object? Opt(int index);
[<Android.Runtime.Register("opt", "(I)Ljava/lang/Object;", "GetOpt_IHandler")>]
abstract member Opt : int -> Java.Lang.Object
override this.Opt : int -> Java.Lang.Object

Parameters

index
Int32

The index of the value to return.

Returns

The value at index, or null if the array has no value at that index.

Attributes

Remarks

Returns the value at index, or null if the array has no value at index.

Java documentation for org.json.JSONArray.opt(int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to