Targeted JSON Pointer: Extract the count of Total Array Elements
using Targeted JSON Pointer..
ASTER::EXPRESSION::JSON::Targeted JSON Pointer: Extract the Count of Elements in a JSON Array
Before using this function, set the path for the JSON array using the Targeted JSON Pointer feature.
When the JSON data type with the targeted path is a “JSON array,” retrieve the number of elements in the array.
Parameter: Noone
Assume that the following JSON data is loaded in memory, and specify the path to the array using Targeted JSON Pointer.
{
"example":[ 1, 2, 3 ]
}"/example""example" is a JSON array, and the array contains 3 elements.
ExNumTgtArEle( "ASTER" )The return value is “3.”
Note
This function only returns meaningful values when a path is set for a “JSON array.”
Targeted JSON Pointer checks the validity of the path and the data type of the specified target during path configuration.
If the path specified by Targeted JSON Pointer does not point to a “JSON array,” this function will always return 0.
The data structure types “JSON object” and “JSON array” are distinct data types, and this function cannot retrieve the number of elements from a JSON object.