For some reason, I find it kinda funny you don't just ask the LLM to extract the values for you. Practically, your solution makes a lot of sense -- way fewer tokens, less likely to make weird one-off errors, can verify the response makes basic sense or re-use the code off-line or with sensitive data...
But if I were watching Star Trek, they would definitely just ask the computer to grab the fields and it would be a done deal!
But if I were watching Star Trek, they would definitely just ask the computer to grab the fields and it would be a done deal!