I have a JSON string that I need to parse on the client side in order to extract data for three different column names (MAT_ETHNICITY, PAT_ETHNICITY, SEX). My goal is to populate drop down lists with the values. Should I handle this by making three separate SQL calls and sending the data via three server calls, parsing it server-side, or parsing it client-side using a loop? Thank you.
[
{
"REFCODE": "HIS",
"DESCRIPTION": "Hispanic or Latino",
"COLUMN_NAME": "MAT_ETHNICITY"
},
{
"REFCODE": "NHIS",
"DESCRIPTION": "Not Hispanic or Latino",
"COLUMN_NAME": "MAT_ETHNICITY"
},
{
"REFCODE": "UNK",
"DESCRIPTION": "Unknown",
"COLUMN_NAME": "MAT_ETHNICITY"
},
{
"REFCODE": "AMERIND",
"DESCRIPTION": "American Indian/Alaska Native",
"COLUMN_NAME": "PAT_ETHNICITY"
},
{
"REFCODE": "ASIAN",
"DESCRIPTION": "Asian",
"COLUMN_NAME": "PAT_ETHNICITY"
},
{
"REFCODE": "HAW",
"DESCRIPTION": "Native Hawaiian or Other Pacific Islander",
"COLUMN_NAME": "PAT_ETHNICITY"
},
{
"REFCODE": "AA",
"DESCRIPTION": "Black or Africian American",
"COLUMN_NAME": "PAT_ETHNICITY"
},
{
"REFCODE": "WHITE",
"DESCRIPTION": "White",
"COLUMN_NAME": "PAT_ETHNICITY"
},
{
"REFCODE": "MORE",
"DESCRIPTION": "More than one race",
"COLUMN_NAME": "PAT_ETHNICITY"
},
{
"REFCODE": "UNK",
"DESCRIPTION": "Unknown",
"COLUMN_NAME": "PAT_ETHNICITY"
},
{
"REFCODE": "M",
"DESCRIPTION": "Male",
"COLUMN_NAME": "SEX"
},
{
"REFCODE": "F",
"DESCRIPTION": "Female",
"COLUMN_NAME": "SEX"
}
]