I have a requirement where I want to add null values for properties which are non existent in the array of objects. I don't want to loop over
var data=[
    {
        "id": 1,
        "name": "John"
    },
    {
        "id": 2
    },
    {
        "id": 3
    }
]
Expected result is as follows
[
    {
        "id": 1,
        "name": "John"
    },
    {
        "id": 2,
        "name": null
    },
    {
        "id": 3,
        "name": null
    }
]
 
     
     
    