title: looping json array to find objects parent and then parent's parent
body: <p>I have a number of objects in an array all which have a parentID (0 signifying no parent - top level).
  Given one item, I need to loop through the array and build a lineage of objects. 
  Does anyone know of a function to do this? I'm trying not to reinvent the wheel and not sure what to search for.</p>
  
  <p>thanks</p>