Groovy web console

subscribe to the feed Subscribe
to this
site

Posible Solucion

Published 3 months ago by yO
Actions  ➤ Edit in console Back to console Show/hide line numbers View recent scripts
def list = [:]

list.siteUser = [:]

def aux = [Collection, Object[]].any{ it.isAssignableFrom(list.siteUser.getClass()) } 

if( aux ){
    println list.siteUser.collect{ cbtUser -> [id: cbtUser.id]} 
}else {
    println "esta vacio"
}

//println list?.siteUser  && list.siteUser.collect{ cbtUser -> [id: cbtUser.id]}