How to get the value of a nested object with unknown paths?
问题 Originally, I was rendering components by using this code to map an array of objects( [{}, {}, {}] ): let todoComponents = allTodos.map(item => <Todos key={item.id} item={item} handleChange={handleChange}/>) However, this does not work on a separate project where I am getting data from Firebase with a different data structure. In it, each object has a unique name. [{ "-M8CpcbvDriZpw4sc4IW" : { "completed" : false, "id" : "-M8CpcbvDriZpw4sc4IW", "text" : "Get Comic Book" }, "-M8Cpku0PCNu0