I have method but i can't understand why i have the type mismatch error . It my by close to this issue Type Mismatch For Comprehension but i cant figure out why ??
i just want to create new list of (List[jsvalue], jsvalue) .
this is the error
Error:(41, 11) type mismatch;
found : List[(List[play.api.libs.json.JsValue], play.api.libs.json.JsValue)]
required: scala.concurrent.Future[?]
a <- x.map(_._1)
^
thanks miki
def test(future: Future[List[(List[JsValue], JsValue)]]) = {
future.flatMap(x => {
for {
a <- x.map(_._1)
b <- x.map(_._2)
} yield (a, b)
})