|
Hi everyone, I need help pulling individual data out of a JSON file I made for an app I am building. The JSON might not be set up ideally, so please feel free to comment on that, too. (I eventually want to filter the meridian element chosen and then pass the point name to my UI, as well as eventually showing a photo + description in a dedicated view) I am able to successfully decode the JSON file, so when I pull up the count I get the right number (12), but I cant seem to figure out how to get to the individual data points. I am linking my GitHub repo with all of the files, and pasting the relevant parts of my code here. Please help, I have been stuck on this for weeks, I redid the Moonshot app 3 times, and have read anything I could on working with JSONs, but I can't seem to get unstuck, and the more I read, the more I dig myself in this rut. Meridian and Acupoint Structs + ContentView
JSON (shortened for convenience's sake)
|
|
While you have used a
or you can add this to
then use it
however you would be better off doing then add the each one as needed. This will be eliminate the uses of
and then
PS careful as in Liver json you have two IDs the same, this will cause expected results |
SPONSORED Still waiting on your CI build? Speed it up ~3x with Blaze - change one line, pay less, keep your existing GitHub workflows. First 25 HWS readers to use code HACKING at checkout get 50% off the first year. Try it now for free!
Sponsor Hacking with Swift and reach the world's largest Swift community!
You need to create an account or log in to reply.
All interactions here are governed by our code of conduct.
Link copied to your pasteboard.