Add compact method to remove the "type"/"value" keys in favor of plain values.