Conditionally select json elements by config type