Input a processed document, extract the value corresponding to the key the user wants, and return the relevant reference