Matriz de entrada oculta para JavaScript

É possível ter o valor de um campo de entrada oculto como uma matriz e, em seguida, tê-lo passado para o controlador Spring MVC?

function foo(){
 var myArray = new Array();
 myArray[0] = "Hello";
 myArray[1] = "World!";
 document.getElementById("hiddenInp").value=myArray;
}

E então no controlador fazer algo como

@RequestMapping ...
public String test(HttpServletRequest request){
String[] myArray = request.getParameter("hiddenInp");
// Assuming that the name of the hidden input field is also hiddenInp
System.out.println(myArray[0] + myArray[1]);
...
}

E se eu estiver trabalhando com um array associativo? Onde os índices são string em vez de int

questionAnswers(4)

yourAnswerToTheQuestion