Why does fetch return a weird hash of integers - part 2?
问题 I'm using async/await with React Native. My result from response.json() is: { _45: 0, _81: 0, _65: null, _54: null } For whatever reason, the actual response I want is located in _65 and I have no idea what these random keys are. It seems that it is related to the fact that .json() returns a Promise. componentDidMount() { this.getData().then(data => this.setState({ data })) } async getData() { try { let response = await fetch(myUrl) let json = await response.json() return json } catch(err) {