Everything that is not separable is part of the object
You can teleport any single object that fits into a 10-foot cube and is not held or carried, there is no weight limit. So what is an object? The definition of object (DMG, p. 246) is:
For the purpose of these rules, an object is a discrete, inanimate item like a window, door, sword, book, table, chair, or stone, not a building or a vehicle that is composed of many other objects.
What you consider part of an object is not more explictly defined, and it will be up to the DM to adjudicate, but the examples in the DMG provide support that loose parts that cannot be easily separated from the object are part of the object.
First, the part about not being composed only applies to large objects, such as a ship or house, that you would want to divide into components for purposes of attacking and damaging. This is therefore not a hinderance for having small, composed objects.
Second, example objects listed in a table on p. 247 DMG about object sizes include a lock and, explicitly, a chest. That means, these must be bona fide objects, and attributes they have cannot be attributes that exclude something from being an object.
Both of these items have, moving, separate components. The lock will include tumblers and other, internal moving parts of the locking mechanism. The chest will have a lid with hinges, handles, and may even have it's own lock in turn. All these are lose, in a similar way coins in a locked chest or tied up sack are loose: they can move, and there can be air, oil or other substances in between them and other parts of the object. In all these examples, the components however are interlocking and not easily separated from the main bulk of the object. This gives us a baseline for judging what should be transported.
It seems pretty clear that a table with stuff lying on it is not an integral thing in the same way, and only the table would be teleported. All the other items are loose and unconnected to it. If you however fastened all the items to the table with 50 feet of rope wrapped around (or built a parcel as suggested in Korvin's excellent answer), it would qualify as a single object.
A chest by itself is clearly an object, it is even in the given examples. The items within a locked chest can not be separated from the chest and would count as part of the object. However, if you hacked the chest open, or unlocked and opened it, then they could easily fall out, and would not be part of it any more nor be teleported along with it.
One side consequence is that if you target a locked chest with disintegrate, all the (non-magical) items in the chest would likewise disintegrate. This has the added benefit that disintegrate cannot be used as a pseudo-masterkey for potentially trapped treasure chests. Unless you prefer your treasure in the form of a pile of grey dust.