You are here: Web Services > Working with JSON Data > Using XPRIM_RandomAccessJsonReader to Read JSON Values > Read…AtIndex

Read…AtIndex

Read..AtIndex extracts a value from an array element with the specified index.

The "current" element must be an array.

* Declare an XPRIM_JsonObject to hold the contact number

Define_Com Class(#XPRIM_JsonObject) Name(#ContactNoItem)

* Get the object at index 1

#ContactNoItem.Refer To(#Reader.ReadObjectAtIndex(1))

* Pass the object to another method

#AnotherComponent.ProcessContactNo Object(#ContactNoItem)