merge logic complete; used json to create unique element array