Key
Key Key of function Show in Object Toolsexpects an optional array of key names that defines the value that needs to be displayed.
The key names should not include the usual key suffix.
If none is supplied, the full contents of the referenced object are displayed.
If a single key name is supplied, the value associated with the respective key is displayed, whatever this value may be.
An array of two or more key names is relevant only if the value associated with the first key name is some sort of collection, either another object or an array.
As an example of the object case, assume that the referenced object contains the key Underlying, of which the associated value is an object of type Swap that contains several keys, one of which is called Maturity
Then using the array Underlying , Maturity will instruct the Show function to return the contents of the value associated with the key Maturity of the underlying object pointed by the key Underlying
This process could be repeated in unlimited depth.
As an example of the array case, assume that the referenced object contains the key Rates, of which the associated value is a 1D-array of interest rates.
Then using the array Rates , "2,4" will instruct the Show function to return only the second, third and fourth elements of the associated array of rates.
Below are detailed rules for accessing selected portions of multidimensional arrays.
The value passed to the kwy Key of the Show function specifies which portion of the referenced array should be retrieved.
It must be either a properly formatted key or otherwise one of n1 or n1,n2 or n1,n2,n3 or n1,n2,n3,n4, where n1,n2,n3,n4 are integers.
Examples:
Below 0 may be also replaced with any negative integer.
1 -> 1ˢᵗ aray element. This would be the first row if the array is two-dimensional.
0 -> last aray element. This would be the last row if the array is two-dimensional. The 0 may be also omitted completely.
2,4 -> contiguous portion starting with the 2ⁿᵈ and ending with the 4ᵗʰ aray element. This would be the 2ⁿᵈ, 3ʳᵈ and 4ᵗʰ rows if the array is two-dimensional.
1,4 or 0,4 or ,4 -> contiguous portion starting with the 1ˢᵗ and ending with the 4ᵗʰ aray element.
2,0 or 2, -> contiguous portion starting with the 2ⁿᵈ and ending with the last aray element.
2,4,7 -> contiguous portion starting with the 2ⁿᵈ, ending with the 4ᵗʰ row and keeping only the 7ᵗʰ column.
2,4,7,9 -> contiguous portion starting with the 2ⁿᵈ, ending with the 4ᵗʰ row and keeping only the 7ᵗʰ until 9ᵗʰ columns.
2,4,7,0 or 2,4,7, -> contiguous portion starting with the 2ⁿᵈ, ending with the 4ᵗʰ row and keeping all columns at and beyond the 7ᵗʰ.
0,0,7,9 -> last row and keeping only the 7ᵗʰ until 9ᵗʰ columns.
0,0,7,0 or 0,0,7, -> last row and keeping all columns at and beyond the 7ᵗʰ.
0,0,7 -> last row and keeping only the 7ᵗʰ column.
0,0,0,0 or 0,0,0 -> element located at last row and last column.
