Mysql Json Array Distinct Javascript Interview Programming