Emulate D3's data joining behaviour for non-DOM objects.