• Jobs
  • About Us
  • professionals
    • Home
    • Jobs
    • Courses and challenges
    • Questions
    • Teachers
  • business
    • Home
    • Post vacancy
    • Our process
    • Pricing
    • Assessments
    • Payroll
    • Blog
    • Sales
    • Salary Calculator

0

90
Views
Join 2 arrays like left join in javasript

Lets say I have 2 arrays as follows

const cols = [A,B,C,D]



const rows = [
  [
    'Row 1',
     A : 2,
     B : 5
  ],
  [
    'Row 2',
     B : 2,
     C : 5
  ]
]

Is there anyway to join it to get the following result like a left join in SQL, Any help is most appreciated thanks

[
  [
    'Row 1',
     A : 2,
     B : 5,
     C : 0
     D : 0
  ],
  [
    'Row 2',
     A : 0,
     B : 2,
     C : 5,
     D : 0,
  ]
]```
almost 3 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Our process Sales
Legal
Terms and conditions Privacy policy
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Recommend me some offers
I have an error