Play 2.0 Java: Bind an array from request

前端 未结 2 499
情话喂你
情话喂你 2021-01-05 15:54

I... stuck o.O

I\'ve params in foreign request:

param[62537]=abc;
param[20356]=cde;
param[92837]=fgh;

And I\'m looking for

2条回答
  •  被撕碎了的回忆
    2021-01-05 16:40

    Not the prettiest way, but did you try to get the keys of the Map returned by asFormUrlEncoded:

    Set keys = request().body().asFormUrlEncoded().keySet();
    for (String key : keys) {
         // check if key begin with "param["
    }
    

提交回复
热议问题