i have an array of objects:
arr=[ {a: \'xm\', b: 1}, {a: \'dm\', b: 1}, {a: \'xm\', b: 2}, {a: \'xm\', b: 1}, {a: \'dm\', b: 4}, {a: \'xm\', b: 1}, {a: \'dm\'