Learn Courses My Dashboard

Help organizing my json file in my project

I want to create an app where I can keep track of people that I see in a nursing home. I want a record of the person’s name, age, comments and the date I talked to them. I will be seeing the same 100 people over and over on different dates and have different comments each time.
I am a beginner and I don’t know how to organize this info in a json file. For example, do just have a name: string for each person or should I have name: array and have each name go int an array instead of each visit having its own entry. Sorry, this is hard for me to explain - I though somebody might understand what Im getting at.

Todd

Hey Todd, thanks for this use case description! Seems interesting, and wayyyyy better to track in an app versus on spreadsheets. Have you checked if someone already built an app like this?

Hey no problem!! It’s great you’re asking questions for things you don’t understand. Many people are too scared/ proud to do the same…

Here’s how I would structure the JSON for this use case, by showing example data:

{
    "patientList": [
        {
            "name": "Steve",
            "dob": "June 1940",
            "vistList": [
                {
                    "date": "Monday, February 14, 2022",
                    "comment": "Patient is excited to see sweetheart on Valentine's Day"
                },
                {
                    "date": "Tuesday, February 11, 2022",
                    "comment": "Steve and I had a great afternoon his mood was much better than yesterday"
                }
            ]
        },
        {
            "name": "Marge",
            "dob": "February 1945",
            "vistList": [
                {
                    "date": "Monday, February 14, 2022",
                    "comment": "Loved the chocolates I brought here. In good spirits"
                }
            ]
        }
    ]
}

If you like I could help you build this :slight_smile: direct message me for more details.