I am making an ajax call and getting a JSON response. In the response I am getting time in following format:
12:00 pm //typeof of this is String.
I need to compare this time with the other times returned and find the earliest time.
What would be the best way of doing this? I was thinking of converting it to 24 Hour format in int and then directly compare, but how can we convert this to 24 hour format in the best way?