return operation on failure
send object instead of hash of objects if no array given
latest js code