1
What's the best way to store a list of dates with associated values?
Post Flair (click to view more posts with a particular flair)
Post Body
I know this is a simple question but for some reason my brain isn't cooperating on this.
I have a list of dates in chronological order, and each date has an associated value (step count for that date, or distance walked).
What's the best way to store these values while maintaining the order (or at least being able to sort it)
- Dictionary's don't keep their sorting
- An array of tuples?
- Two arrays, one with dates and one with strings?
To clarify, I mean to store them in app so I can display them in a view. I don't need to store them to any sort of long-term storage or memory.
Author
Account Strength
100%
Account Age
12 years
Verified Email
Yes
Verified Flair
No
Total Karma
42,856
Link Karma
3,705
Comment Karma
38,824
Profile updated: 5 days ago
Posts updated: 7 months ago
Subreddit
Post Details
We try to extract some basic information from the post title. This is not
always successful or accurate, please use your best judgement and compare
these values to the post title and body for confirmation.
- Posted
- 4 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/iosdev/comm...