Postgresql Select Json Array Length Python Array Index