Perseverance is also crucial. Despite facing multiple obstacles, they kept going. Edison didn't stop after a few failed attempts at the light bulb. He kept trying different things. And having a vision is important too. Jobs had a vision for Apple, and even when things went wrong, he still held onto that vision and worked towards it, using his failures as a way to get closer to achieving it.
The ability to adapt is a significant element. They didn't keep doing the same thing over and over expecting different results. Rowling might have changed some aspects of her writing or the way she presented her work to publishers. Edison adapted his experiments based on the results he got. And Jobs adapted his leadership and product ideas over time, all of which were essential in their journey from failure to success.