Hi guys,
How will I sort the field with empty value always at the bottom of the lists?
When doing ORDERY BY [ASC | DESC].
// My query
SELECT meta().id, firstName, lastName, metadata FROM `bluebonnet` WHERE `type`='contact' ORDER BY firstName ASC LIMIT 20
// Query Results ORDER BY firstName ASC.
[
{
"firstName": "",
"id": "contact::01",
"lastName": ""
},
{
"firstName": "",
"id": "contact::02",
"lastName": ""
},
{
"firstName": "Alice",
"id": "contact::03",
"lastName": "Doe"
},
{
"firstName": "John",
"id": "contact::04",
"lastName": "Doe",
"metadata": {
"locationName": "location test"
}
}
// expected results something like this:.
[
{
"firstName": "Alice",
"id": "contact::03",
"lastName": "Doe"
},
{
"firstName": "John",
"id": "contact::04",
"lastName": "Doe",
"metadata": {
"locationName": "location test"
}
{
"firstName": "",
"id": "contact::01",
"lastName": ""
},
{
"firstName": "",
"id": "contact::02",
"lastName": ""
},
}
Not just the firstName but, also sorting other fields.
Thanks 