
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to merge objects into a single object array with JavaScript?
Following is the code to merge objects into a single object array −
Example
Document Merge objects into a single object array
[{id:22, class:7},{name:'Rohan', age:12},{state:'Delhi',country:'India'}]Click on the above button to merge the above objects inside array into a single object
Output
The above code will produce the following output −
On clicking the ‘CLICK HERE’ button −
Advertisements