I want to assign an element of an array to a variable directly using groovy as follows:
def str = "xyz=abc" def [name, value] = str.split("=")
but he doesnβt like groovy. Is there any way to do this (do not store the result of the array and get index [0], index [1] from it?).
Thanks,
groovy
Sean nguyen
source share