var json = [
"{"AccountType":"CurrentLiability","AccountCode":"880","Name":"Owner A Drawings"}",
"{"AccountType":"CurrentLiability","AccountCode":"881","Name":"Owner A Funds Introduced"}",
"{"AccountType":"TermLiability","AccountCode":"900","Name":"Loan"}",
"{"AccountType":"Equity","AccountCode":"960","Name":"Retained Earnings"}",
"{"AccountType":"Equity","AccountCode":"970","Name":"Owner A Share Capital"}"
]
我想要这种格式: -
[Object, Object, Object, Object, Object, Object, Object, Object]
Array[62]
0
:
Object
$$hashKey
:
"object:3216"
AccountCode
:
"090"
AccountType
:
"Bank"
Name
:
"Business Bank Account"
__proto__
:
Object
1
:
Object
2
:
Object
答案 0 :(得分:0)
试试这个:
print(type(of: test)) // Test
print(test2) // <__lldb_expr_22.Test: 0x7ffe8cb063e0>
let isEqual = type(of:test2) == type(of: test) // true