What is Nostr?
David Bureš /
npub1zl9…dnmj
2023-06-25 10:45:21

David Bureš on Nostr: Hey guys, a quick Swift question about arrays. Suppose I have an array like this: ...

Hey guys, a quick Swift question about arrays.

Suppose I have an array like this:
`[["statistic": "account name", "value": " SomeAccount"], ["value": "2023-06-23 16:44:49 UTC", "statistic": "export time“]]`

And I want to transform it into a dictionary like this:
[
"account name": "SomeAccount",
"export time": "2023-06-23 16:44:49 UTC"
]

Basically, take every „statistic“ and turn it into a key, and turn every „value“ into a value for that key.

Any ideas?

#swift
Author Public Key
npub1zl99ghn2xqnyffuf3hrgvtj39wuc0jqtz0g8hul4cfzgufxmnd0slddnmj