i have following two array objects
27A: {id: 228, swift_code: "27", field_description: "Sequence of Total",
line_description: "1/1 (Number)(Total)", commercial: false}
31B: {id: 230, swift_code: "31C", field_description: "Date of Issue",
line_description: "dd/mm/yyyy", commercial: false}
31C: {id: 242, swift_code: "31D", field_description: "Expiry Date/Place
(dd/mm/yyyy)", line_description: "IN SINGAPORE", commercial: true}
my second array
67: {id: 228, swift_code: "27", field_description: "Sequence of Total",
line_description: "1/1 (Number)(Total)", commercial: false}
44: {id: 230, swift_code: "31C", field_description: "Date of Issue",
line_description: "dd/mm/yyyy", commercial: false}
12: {id: 242, swift_code: "31D", field_description: "Expiry Date/Place
(dd/mm/yyyy)", line_description: "IN SINGAPORE", commercial: true}
i want to combined these two array together like bellow without modifying the order which means first array come first second array second
like bellow
27A: {id: 228, swift_code: "27", field_description: "Sequence of Total",
line_description: "1/1 (Number)(Total)", commercial: false}
31B: {id: 230, swift_code: "31C", field_description: "Date of Issue",
line_description: "dd/mm/yyyy", commercial: false}
31C: {id: 242, swift_code: "31D", field_description: "Expiry Date/Place
(dd/mm/yyyy)", line_description: "IN SINGAPORE", commercial: true}
67: {id: 228, swift_code: "27", field_description: "Sequence of Total",
line_description: "1/1 (Number)(Total)", commercial: false}
44: {id: 230, swift_code: "31C", field_description: "Date of Issue",
line_description: "dd/mm/yyyy", commercial: false}
12: {id: 242, swift_code: "31D", field_description: "Expiry Date/Place
(dd/mm/yyyy)", line_description: "IN SINGAPORE", commercial: true}
i have used merge and array copy but its modifying the order
angular.merge(arraiobj1, arraiobj2);