This might become fairly simple if we stored data as Map<<pair<category, datakey>, jobhistoryRecord>