I create an object from duplicates array and I dynamically push to it elements. Everything works fine, excepting that I\'m getting an additional empty element and I
duplicates
Change your code as below to fix this :
Current : "variables":[{}],
To Fix : "variables":[],
You defined that empty object here:
"variables":[ { } ],