I give as an example the following array of objects in JSON:
[{"id":"aaa","uns":"123"},{"id":"bbb","uns":"023"},{"id":"aaa","uns":"123"},{"id":"ccc","uns":"765"},{"id":"ddd","uns":"256"}].
I would like to obtain an array with the repeated objects (note that in the example the object is repeated with id: aaa), something like this:
[{"id":"bbb","uns":"023"},REPETIDOS[{"id":"aaa","uns":"123"}],{"id":"ccc","uns":"765"},{"id":"ddd","uns":"256"}]
How could I get the elements repeated with javascript / Jq? with a simple array I get it, but with an array of objects it resists me.