titles <- chars |>
unnest_wider(json) |>
select(id, titles) |>
unnest_longer(titles) |>
filter(titles != "")
titles
## # A tibble: 52 × 2
## id titles
## <int> <chr>
## 1 1022 Prince of Winterfell
## 2 1022 Lord of the Iron Islands (by law of the green lands)
## 3 1052 Acting Hand of the King (former)
## 4 1052 Master of Coin (former)
## 5 1074 Lord Captain of the Iron Fleet
## 6 1074 Master of the Iron Victory
## 7 1166 Captain of the Guard at Sunspear
## 8 1295 Maester
## 9 130 Princess of Dorne
## 10 1303 Queen of the Andals and the Rhoynar and the First Men, Lord of the Sev…
## # ℹ 42 more rows