javascript - compare first property of two object and merge -


i have 1 question compate 2 object property have 2 object different value want compare object , if first property in both object change property value object

1)

obj1 = {a: 1001, b: 3147020, c: 30}, {a: 1002, b: 3147021, c: 30}, {a: 1003, b: 3147022, c: 30}; 

2)

obj2 = {a: 1001, b: 3147020, c: 30}, {a: 1002, b: 3147021, c: 30}, {a: 1004, b: 3147022, c: 30}; 

when compare if find same value in both object change obj1 b value obj2 b value , if have ides check in both object obj1 value not same obj2 value please me question

those not objects.

this object:

obj1 = {a: 1001, b: 3147020, c: 30};    

this array

arr1 = ['hello', 'world', '!'];  

and can make array of objects, example:

items = [{a: 1001, b: 3147020, c: 30},   {a: 1002, b: 3147021, c: 30},   {a: 1003, b: 3147022, c: 30}]; 

so, question? rephrase?


Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -