Postgresql Create Function Return Json Array In Javascript Functions