assigning to local variables in scala template in play framework
Posted
by
user3548344
on Stack Overflow
See other posts from Stack Overflow
or by user3548344
Published on 2014-05-25T20:15:14Z
Indexed on
2014/05/30
9:27 UTC
Read the original article
Hit count: 489
I am trying to define the local variables and assign to them as below :
@defining((Json.parse(value), ("GGGGGG"))) {case (json:JsValue, lb)=>
@{lb=json\\"myTestField"}
}
but getting the error reassignment to val. So I tried to declare lb as var like
@defining((Json.parse(value), ("GGGGGG"))) {case (json:JsValue, lb:var)=>
@{lb=json\\"myTestField"}
}
but getting the error identifier expected but 'var' found
How can I assign to variable lb?
© Stack Overflow or respective owner