Postgresql Index Array Javascript Methods Syntax