How I get Json value in React.js?

Viewed 41

I can't get the Json value.

I wright like the following.

React.js

  const arm = sensor.filter(c => c.object_id === object_id).map((sensor_item, i) => { return {sensor_item}});
  console.log(arm)  //63 index
  console.log(arm[0]) //64 index

I got this response like the photo(Chrome console).

Like the picture below You can see that the value of armed in arm[0] contains the information "true" enter image description here

but I wright like this

 const arm = sensor.filter(c => c.object_id === object_id).map((sensor_item, i) => { return {sensor_item}});
  console.log(arm)
  console.log(arm[0])
  console.log(arm[0].sensor_item)

I got the error like photo below... I don't know why... enter image description here

0 Answers
Related