pass javascript object to native call