Below is an examplle of an array I have
var mm = [
{"id":"Junk","text":"Junk","parent":"#"},
{"id":"IMG_0245.JPG","text":"IMG_0245.JPG","parent":"Junk"},
{"id":"Junk","text":"Junk","parent":"#"},
{"id":"IMG_0246.JPG","text":"IMG_0246.JPG","parent":"Junk"},
{"id":"Junk","text":"Junk","parent":"#"},
{"id":"IMG_0247.JPG","text":"IMG_0247.JPG","parent":"Junk"},
{"id":"Junk","text":"Junk","parent":"#"},
{"id":"IMG_0248.JPG","text":"IMG_0248.JPG","parent":"Junk"},
{"id":"Junk","text":"Junk","parent":"#"},
{"id":"IMG_0249.JPG","text":"IMG_0249.JPG","parent":"Junk"},
{"id":"Junk","text":"Junk","parent":"#"},
{"id":"IMG_0250.JPG","text":"IMG_0250.JPG","parent":"Junk"},
{"id":"Junk","text":"Junk","parent":"#"},
{"id":"IMG_0251.JPG","text":"IMG_0251.JPG","parent":"Junk"},
{"id":"Junk","text":"Junk","parent":"#"},
{"id":"jingling.rar","text":"jingling.rar","parent":"Junk"},
{"id":"Junk","text":"Junk","parent":"#"},
{"id":"pics.rar","text":"pics.rar","parent":"Junk"}
];
If you notice, the first and third objects in the array are same and so on. I've looked up for built in functions but I couldnt find any. IS there any simple built in. simple function to do this in jQuery or Javascript?