public JSONResult get ( int index ) { if ( value instanceof JSONArray ) { JSONArray array = ( JSONArray ) value ; Object result = array . get ( index ) ; return new JSONResult ( result ) ; } else if ( value instanceof JSONObject ) { return get ( String . valueOf ( index ) ) ; } return new JSONResult ( null ) ; }
Advance current JSON value to specified element in JSON array . Set current JSON value to null otherwise .