subelements lookup plugin

example and test script: https://gist.github.com/sergevanginderachter/6502006
closes #3752