A quick google for "javascript arrays and objects" should give you a list of pages that will show you how to work with arrays and objects and then you can use a function node.
If you post an example it might be easier to explain.
msg.topic = "SELECT duration FROM `Poste12` WHERE `id` = 201";
return msg;SELECT duration FROM `Poste12` WHERE `id` = 201 : msg.payload : array [1][ { "duration": "00:00:17" } [ { "SEC_TO_TIME (SUM(TIME_TO_SEC(duration)))": "01:27:01" } ]
msg.payload = msg.payload[0].SEC_TO_TIME(SUM(TIME_TO_SEC(duration)));
ReferenceError: SUM is not defined (line 1, col 43)
TypeError: Cannot read property 'SEC_TO_TIME' of undefined
SELECT Id, SEC_TO_TIME(SUM(TIME_TO_SEC(duration))) AS Duration FROM ...