I have an array like this
products = [{id}, {id}, {id}, {id}]
I want to place available ids in a parent div
<div data-ids="{{ place ids here }}"> <!-- parent div -->
     products.forEach(function(e){
        <div class="product">
            console.log(e.id);
        </div>
     });
</div>
I would like to put all the available ids in the parent data-ids,
is there any way to put it without an additional loop specifically for placing ids in parent div?
 
     
     
    