I answered my own question after doing some research. Later it was marked as a duplicate (which is fine for me). I even got some upvotes on the answer. But the question got deleted.
I now want to undelete the question. Could there be any specific reason it got deleted? Having 2 downvotes doesn't seem harsh enough to warrant deletion, especially if there's an upvoted answer to it.
For sub-10K users, here are the question and answer:
Adding the Same Object
.