populating a table in SQL database(id:string, value: array of strings)

SELECT * FROM tableT WHERE

Please write code to populate tableT with id as a string, and array of strings as values, so the table would look like:

"Animals"   ["dogs","cats","rats"]
"Liquids"   ["water","tea","milk"]

The purpose of this is to see a certain id, get that Id from the database and display the corresponding array. So, f.e if the client types in “Animals”. The code would connect to database and retrivie the value ["dogs","cat","rats].

Retrieval code is also appreciated (in Javascript)