Hi the below array and code to output a list item works fine:
var quotes = [
[
"quote": "I live you the more ...",
"order": "1"
],
[
"quote": "There is nothing permanent ...",
"order": "2"
],
[
"quote": "You cannot shake hands ...",
"order": "3"
],
[
"quote": "Lord, make me an instrument...",
"order": "4"
]
]
cell.textLabel?.text = quotes[indexPath.row]["quote"]
However if I change the "order" values to be numbers rather than text like below then for the above line I get an error message in Xcode "No exact matches in call to subscript". Please could someone tell me how to make it work with the numbers stored as numbers? (I'm wondering if creating an any array type and using the .text function has caused a conflict but I can't find how to resolve)
[
"quote": "I live you the more ...",
"order": 1
],
[
"quote": "There is nothing permanent ...",
"order": 2
],
[
"quote": "You cannot shake hands ...",
"order": 3
],
[
"quote": "Lord, make me an instrument...",
"order": 4
]
]
Thank you for any pointers :-)