Based on the response I get , I will be generating the divs dynamically . for instance if my response is
Array = {response: {
" para1" : "para1name",
" para2" : "para2name"
}
}
<div *ngFor="let x of Array; >
<button>x.para1</button>
<div > content for para1</div>
</div>
I have to store all the properties from json into an array and iterate through it to display the divs. In this case I should have 2 divs But its not working . and also when I click on the button for para1 then div for para1 should be shown n when I click on para2 div I should hide div for para1 and should show div for para2 . how this can be accomplished.