if only object then in js condition code example Example: checking a condition in object javascript { id: 'some-id', ...(true && { optionalField: 'something'})}