Assuming I have the following:
var array = [ {\"name\":\"Joe\", \"age\":17}, {\"name\":\"Bob\", \"age\":17}, {\"name\":\"Carl\
I know my code is little length and little time complexity but it's understandable so I tried this way.
I'm trying to develop prototype based function here and code also change.
Here,Distinct is my own prototype function.