Postgresql Iterate Over Array In Javascript Example File