Skip to content

Category: Questions

Cannot extract JSON property from object

I have this code Which gives me this output Within the actual body of this output there is this: I want to call out the hotelID number: 424023 I have tried the following a few other modifications to this, but cannot seem to call out the correct object But I get the error message Answer You’ve called you…

Sending the id of the respective component through a click

I am trying to send the id of the respective object through an on-click event , yet I always end up being sent the synthetic onClick event , how can I change this ? How my array of objects looks like : My onClick={(id)=>handleOpen(id)} EDIT: It was recommended to change the renderig of the button in the fo…