From the sounds of it, you weren't at Erik Trautman's "Job Ready" point when you were hired (and weren't going to get there without being hired). How did you write your resume and handle interviews?
I had quite a bit of experience with relational databases from my previous job, which I leveraged pretty heavily on my resume. As far as interviews, I was very honest about what I did and didn't know, and passed a coding test by pulling an all-nighter (and taking a vacation day) to learn a tiny bit about Django.
The offer came from a company I had initially reached out to about an unpaid internship, which eventually manifested into a full-time job. We agreed to a three month trial period, and they kept me on afterwards.
There was no doubt plenty of luck involved in the whole process. I sent dozens of cold emails, and offered to work for free several times (thankfully never had to).