Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/arrays/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
访问对象JSX/Javascript中的对象数组_Javascript_Arrays_Reactjs_Object_Jsx - Fatal编程技术网

访问对象JSX/Javascript中的对象数组

访问对象JSX/Javascript中的对象数组,javascript,arrays,reactjs,object,jsx,Javascript,Arrays,Reactjs,Object,Jsx,我试图访问这个对象中分配给一个名为whoami的变量的数组 Console.log of whoami. {users: Array(14)} users: (14) [{…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}] __proto__: Object object expanded in console.log {users: Array(14)} users: Array(14) 0: {_id:

我试图访问这个对象中分配给一个名为whoami的变量的数组

Console.log of whoami.
{users: Array(14)}
users: (14) [{…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}]
__proto__: Object

object expanded in console.log
{users: Array(14)}
users: Array(14)
0: {_id: "5f4594eb3615404430a6e0ed", username: "tester2", email: "test2@test.com", __typename: "User"}
1: {_id: "5f459574d84db85364a2ff33", username: "tester3", email: "test3@test.com", __typename: "User"}
2: {_id: "5f459661d117fe4da8fb22b0", username: "tester4", email: "test4@test.com", __typename: "User"}
3: {_id: "5f4596ec7b73832f1cfac587", username: "tester5", email: "test5@test.com", __typename: "User"}
4: {_id: "5f4597a1a77eaa55202864ce", username: "tester6", email: "test6@test.com", __typename: "User"}
5: {_id: "5f45980ae42b46314ce959e8", username: "tester7", email: "test7@test.com", __typename: "User"}
6: {_id: "5f459822e42b46314ce959ea", username: "tester10", email: "test10@test.com", __typename: "User"}
7: {_id: "5f45a8df19748f49a8708ad4", username: "tester11", email: "test11@test.com", __typename: "User"}
8: {_id: "5f45b50e6930cd4998e0a7fd", username: "tester14", email: "test14@test.com", __typename: "User"}
9: {_id: "5f45b57b8ddec40b346b0edc", username: "tester15", email: "test15@test.com", __typename: "User"}
10: {_id: "5f484147ebfd0d28d48bb608", username: "bob", email: "bob@aol.com", __typename: "User"}
11: {_id: "5f4bdde8af146115cc417279", username: "BadBob", email: "bobbad@aol.com", __typename: "User"}
12: {_id: "5f4c03adb7fad8125cb01777", username: "Atest", email: "test@aol.com", __typename: "User"}
13: {_id: "5f515535d7bc7d6b6c64fcaf", username: "testUser23", email: "test23@aol.com", __typename: "User"}
length: 14
__proto__: Array(0)
__proto__: Object
我已经尝试了whatami.users[0]和whatami.users.users[0],但react无法编译


非常感谢您的帮助。

在您的示例中,第一行是“whoami”,但后来您使用了“whatami”,这是打字错误吗?