diff --git a/content/reference/functions/classfilterdata.markdown b/content/reference/functions/classfilterdata.markdown index b188a5320..a1344cf19 100644 --- a/content/reference/functions/classfilterdata.markdown +++ b/content/reference/functions/classfilterdata.markdown @@ -16,18 +16,10 @@ If the `data_structure` argument is specified to be: - `"array_of_arrays"`, the `data_container` argument is interpreted as an array of arrays, and the `key_or_index` argument is interpreted as an index within - the children arrays. The `key_or_index` argument is required. + the children arrays. - `"array_of_objects"`, the `data_container` argument is interpreted as an array of objects, and the `key_or_index` argument is interpreted as a key within the - children objects. The `key_or_index` argument is required. -- `"object_of_arrays"`, the `data_container` argument is interpreted as an object - of arrays, and the `key_or_index` argument is interpreted as an index within - the children arrays (if specified). If the `key_or_index` argument is omitted, - the key of the child array itself is used as a class expression. -- `"object_of_objects"`, the `data_container` argument is interpreted as an object - if objects, and the `key_or_index` argument is interpreted as a key within the - children objects (if specified). If the `key_or_index` argument is omitted, the - key of the child object itself is used as a class expression. + children objects. - `"auto"`, the interpretation is automatically detected based on the data structure. @@ -53,46 +45,6 @@ If the `data_structure` argument is specified to be: {{< CFEngine_include_snippet(classfilterdata_array_of_objects.cf, #\+begin_src\s+example_output\s*, .*end_src) >}} -**Example (with object of arrays):** - -**Policy:** - -{{< CFEngine_include_snippet(classfilterdata_object_of_arrays.cf, #\+begin_src cfengine3, .*end_src) >}} - -**Output:** - -{{< CFEngine_include_snippet(classfilterdata_object_of_arrays.cf, #\+begin_src\s+example_output\s*, .*end_src) >}} - -**Example (with object of objects):** - -**Policy:** - -{{< CFEngine_include_snippet(classfilterdata_object_of_objects.cf, #\+begin_src cfengine3, .*end_src) >}} - -**Output:** - -{{< CFEngine_include_snippet(classfilterdata_object_of_objects.cf, #\+begin_src\s+example_output\s*, .*end_src) >}} - -**Example (with object of arrays using exogenous key):** - -**Policy:** - -{{< CFEngine_include_snippet(classfilterdata_object_of_arrays_exogenous_key.cf, #\+begin_src cfengine3, .*end_src) >}} - -**Output:** - -{{< CFEngine_include_snippet(classfilterdata_object_of_arrays_exogenous_key.cf, #\+begin_src\s+example_output\s*, .*end_src) >}} - -**Example (with object of objects using exogenous key):** - -**Policy:** - -{{< CFEngine_include_snippet(classfilterdata_object_of_objects_exogenous_key.cf, #\+begin_src cfengine3, .*end_src) >}} - -**Output:** - -{{< CFEngine_include_snippet(classfilterdata_object_of_objects_exogenous_key.cf, #\+begin_src\s+example_output\s*, .*end_src) >}} - **Notes:** This function can accept many types of data parameters _(See [collecting function][Functions#collecting functions])_.