How to get min or max value from Array Of Objects | Javascript