convert body data to object