converteted object to JSON properly