Skip to main content

Angular 6 JSON Array Merge into one array

Today, We want to share with you Angular 6 JSON Array Merge into one array.In this post we will show you Combining Angular 6 Arrays, hear for Angular 6 – Reading data from Nested JSON we will give you demo and example for implement.In this post, we will learn about How to combine two JSON Objects in Angular 6 with an example.

Angular 6 JSON Array Merge into one array

There are the Following The simple About Angular 6 JSON Array Merge into one array Full Information With Example and source code.

As I will cover this Post with live Working example to develop merge two object arrays with Angular 6, so the some major files and Directory structures for this example is following below.

  • forkJoin
  • using combineLatest
Also Read :  Ajax Login System with jQuery PHP and MySQLi

Angular 6 Example

Angular Latest My Previous Post With Source code

  1. Angular 6 Folder Project Structure
  2. Angular 6 CLI Installation
  3. Angular 6 Module File
  4. Angular 6 Components
  5. Angular 6 Services
  6. Angular 6 Routing
  7. Angular 6 CSS
  8. Angular 6 Class Binding
  9. Angular 6 Animation
  10. Angular 6 Templating
  11. Angular 6 HTTP Client

optionally use Angular 6 forkJoin:

const users = this.http.getusers();
const products = this.http.getproducts();

forkJoin([users, products]).subscribe(response => {
 // response[0] will be req1(users) response
 // response[1] will be req2(products) response

using combineLatest

//Syntext : combineLatest(observables: ...Observable, project: function): Observable
combineLatest(users, products).subscribe(response => {

Example 1: Combining observables emitting at 3 intervals

const timerFirst = Rx.Observable.timer(1000, 4000);
const timerSecond = Rx.Observable.timer(2000, 4000);
const timerThree = Rx.Observable.timer(3000, 4000);

const combined = Rx.Observable.combineLatest(timerFirst, timerSecond, timerThree);

const subscribe = combined.subscribe(
  ([timerValfirst, timerValSecond, timerValThree]) => {
    `User First News: ${timerValfirst},
     User Second News: ${timerValSecond},
     User Third News: ${timerValThree}`

Angular 6 CRUD Operations Application Tutorials
Also Read :  Angular 6 Http Request Methods Tutorial with Example

Read :


You can also read about AngularJS, ASP.NET, VueJs, PHP.

I hope you get an idea about Angular 6 JSON Array Merge into one array.
I would like to have feedback on my blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

Gondaliya Jaydeep

Hi, I’m Jaydeep Gondaliya, PHP is the most popular Programming & Web Development blog. Our mission is to provide the best online resources on programming and web development.Any visitors of this site are free to browse our tutorials, live demos, Examples and download scripts.If you have a project that you want to get started, launch quickly, contact me. Email : [email protected]