I am working on Mysql query to retrieve the JSON Object
Select JSON_OBJECT('id', students.id, 'name', students.name) as test from students;
output
"test": {
"id": null,
"name": null
}
expected output
test: null
How can i check if test object has a null values then return null