implement some data ops for js objects