title: How to create a QML delegate with conditional substructure for a heterogenous list in a ListView
body: <p>I have a (large) 'heterogeneous' list of json objects that I would like to view in a QML ListView, e.g. </p>
  
  <pre><code>[ 
    {"type": "person", "first_name": "John", "last_name": "Smith"},
    {"type": "doggie", "breed": "Maltese", "nickname": "Roger"},
    {"type": "person", "first_name": "Jane", "last_name": "Smith"},
    {"type": "fruit" , "color": "red"},
    ...
  ]
  </code></pre>
  
  <p>I would like to create a delegate that intelligently renders these items, dispatching based on the 'type' field to subcomponents that know how to properly render that particular type.</p>
  
  <p>Ideally I am looking for a solution that is modular (e.g. create a component for each type in a way that is testable in isolation), and then have the ListView delegate select between these choices in the simplest syntax that is performant and idiomatic.  </p>
  
  <p>How should I go about doing this?  In particular, how does one create QML widgets that have conditional structure?</p>
  
  <p>Thanks!  </p>