Array or object: Flip keys and values
Swaps the keys and values of an array or object.
Swaps the keys and values of an array or object. Each value in the input becomes a key in the result, and the key it used to sit under becomes its new value. Use this when you have a plain list of values and want to turn it into a lookup you can check by name, or when you need to know the position each value held in the original list.
Values have to become valid keys, so they must be plain text or whole numbers. If two items share the same value only the last one survives, because they would otherwise produce the same key.
Output:
Each tag has become a key, and its position in the original list (0, 1, 2) has become its value.