# A natural syntax for a Query that holds

Often I have an unevaluated expression in a RuleDelayed Key-Value pair and subsequently want to access the value unevaluated. For example, say I want to Query assoc to yield HoldForm[Range[0,10]]

assoc = <|"a" ->  <|"b" :> Range[0, 10]|>|>;


This can be done readily enough (e.g. start with Query["a",{"b"}]@assoc, KeyValuePatternetc.) but it seems like there should be a more natural syntax?

• Query["a", HoldForm[#"b"] &]@assoc – Edmund Jun 1 '16 at 0:02
• @Edmund Yep, that's natural enough - thanks - quick accept if posted. – Ronald Monson Jun 1 '16 at 0:18

You may use HoldForm.
Query["a", HoldForm[#"b"] &]@assoc