Skip to content

Query on Example #3

@ybchoo

Description

@ybchoo

{
"mid": 1,
"name": "FFFFFF 3333 22",
"age": 33,
"address": "33 KK 44",
"createdon": "2000-01-01T01:01:01",
"defuncton": "2001-01-01T02:02:02",

"medicalhistoryList": [
    {
        "id": 1,
        "pid": 1,
        "description": "P M 1",
        "visitdate": "2023-03-01T01:01:01"
    },
    {
        "id": 2,
        "pid": 1,
        "description": "P M 2",
        "visitdate": "2023-03-01T01:01:01"
    },
    {
        "id": 3,
        "pid": 1,
        "description": "P M 3",
        "visitdate": "2023-03-01T01:01:01"
    },
        "id": 4,
        "pid": 1,
        "description": "P M 4",
        "visitdate": "2023-03-01T01:01:01"
    },
    {
        "id": 5,
        "pid": 1,
        "description": "P M 5",
        "visitdate": "2023-03-01T01:01:01"
    },
    {
        "id": 6,
        "pid": 1,
        "description": "P M 6",
        "visitdate": "2023-03-01T01:01:01"
    },
]

}
From your sample I am able to get row by row information. However, what happen if there are embedded arrary JSON?
For mid = 1, I have lots of pid=1. when I clicked onto row with mid=1, how can I use React Query to drill into embedded json and retrieve all records with pid=1?
Can kindly provide some samples ? Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions