how to store values from json in an array usestate in react code example Example: usestate array push setTheArray([...theArray, newElement]);