Javascript Object Array Get Distinct Records In Sql