If you want to print a struct, especially a collection, use dump()
instead of print()
. The latter prints one long line like this (wrapped here):
[Item(title: "Item 1", age: 10, address: Address(value: "address 1")), Item(title: "Item 2", age: 10, address: Address(value: "address 1"))]
whereas dump()
does this:
▿ 2 elements
▿ Item
- title: "Item 1"
- age: 10
▿ address: Address
- value: "address 1"
▿ Item
- title: "Item 2"
- age: 10
▿ address: Address
- value: "address 1"
Your feedback is valuable: Do you want more nuggets like this? Yes or No
.
.