I'm getting my JSON data as such:
{
"cars": [
{
"make":"BMW",
"model":"X3",
"Lot":"Used"
},
{
"make":"BMW",
"model":"520",
"Lot":"Used"
},
{
"make":"Mercedes",
"model":"550",
"Lot":"New"
},
{
"make":"Mercedes",
"model":"C400",
"Lot":"Used"
}
]
}
I want to group them by the make to show in my dropdown list like so:
BMW
Used
X3
520
Mercedes
New
550
Used
C400
I'm currently using this on a React page and I have the dropdown populated, I'd like to group them as such instead of showing everything on one line for each record