Details
-
New Feature
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
None
-
None
-
Froyo
-
New Feature
-
An `index()` function has been added to puppet that can return the index/key in an Array, Hash, String or other iterable value that is either equal to a given value or for which a given lambda returns a truthy value. Earlier this was difficult to do.
-
Needs Assessment
Description
add an array_index function which returns the index of a specified element in an array,
see the solution in: https://ask.puppet.com/question/4763/how-to-get-an-array-index-in-manifest/
e.g.
$array = ['a', 'b', 'c']
|
array_index($array, 'b') # returns 1
|