I have an array of objects that contains value pairs. I want to be able to access a value like this
myArray.code
or
myArray[0].code
but it says myArray does not contain code. In the console this is what my array looks like. As you can see each object has two items in it and I want to access code and name by them selves not together and I dont know how to do this.
(2) [{…}, {…}]
0: {code: "PROG2700", name: "Client Side Programming"}
1: {code: "PROG1400", name: "jk"}
length: 2
this is the initial array holding these objects
let [state_array_items, setState_array_items] = React.useState<Object[]>([]);