On the client side as of now, it receives an array of record labels from the database. The code below is the query used with Sequelize to call all record labels.
I do receive an array in order by names (strings), but
the array is case sensitive, therefore if the name is capital is will be in the beginning of the array. I will give in an example of what it outputs:
currently:
A
B
C
D
a
b
c
d
but I'm trying to get it to return like this
A
a
B
b
C
c
D
d
If all else fails, I will just make some logic on the client side, but any suggestions would be appreciated.
router.get('/', function (req, res) {
RecordLabel.findAll({
order: ('name').toUpperCase()
})
.then(function (recordLabels) {
return res.json(recordLabels)
})
.catch(function (err) {
return res.json({ error: err})
})
})