so, my code like that:
import java.util.Random;
String[] arr= (vars.get("Types")).split(";");
int idx = new Random().nextInt(arr.length);
String type = (arr[idx]);
vars.put("b_type", type);
The array looks like this
` arr = {"id":1, "type_1":1},{"id":2, "type_2":2},{"id":3, "type_3":3},{"id":4, "type_4":4},...'
Could anyone help? I need to get random arr2 from the array 'arr'.
It could be one element like
`arr1 = {id:value, type_1:value}`
or some of them, i.e.
`arr1 = [{"id":1, "type_1":1},{"id":4, "type_4":4}]`
or equivalent arr1 = arr