I would like my MySql query to return a JSON object that looks as follows:
{\"name\": \"Piotr\", \"likesMysql\": true}
This seems to be wor
Simply go with following,
SELECT json_object( 'name', 'Piotr', 'likesMysql', if(5 MOD 2 = 0, TRUE, FALSE) is true )
Hope you get desired result with this :)