У меня есть одно извлечение данных из API.Данные имеют несколько вложенных списков.Как эффективно очистить эти данные?
Для справки я пытался следить за этим постом при парсинге json с purrr , но, похоже, у моих данных больше вложенных списков, поэтому у меня возникли некоторые трудности с этим.
> jsonRespParsed %>% dput()
list(list(GameId = 14491L, Season = 2019L, SeasonType = 3L, Day = "2019-04-14T00:00:00",
DateTime = "2019-04-14T12:00:00", Status = "Final", AwayTeamId = 11L,
HomeTeamId = 14L, AwayTeamName = "NYI", HomeTeamName = "PIT",
GlobalGameId = 30014491L, GlobalAwayTeamId = 30000011L, GlobalHomeTeamId = 30000014L,
HomeTeamScore = 1L, AwayTeamScore = 4L, TotalScore = 5L,
PregameOdds = list(), LiveOdds = list(list(GameOddId = 384105L,
Sportsbook = NULL, GameId = 14491L, Created = "2019-04-14T14:26:30",
Updated = "2019-04-14T14:54:50", HomeMoneyLine = 300L,
AwayMoneyLine = -397L, HomePointSpread = 1.7, AwayPointSpread = -1.7,
HomePointSpreadPayout = -255L, AwayPointSpreadPayout = 207L,
OverUnder = 5.1, OverPayout = -187L, UnderPayout = 157L))),
list(GameId = 14492L, Season = 2019L, SeasonType = 3L, Day = "2019-04-14T00:00:00",
DateTime = "2019-04-14T19:00:00", Status = "Final", AwayTeamId = 6L,
HomeTeamId = 16L, AwayTeamName = "TB", HomeTeamName = "CBJ",
GlobalGameId = 30014492L, GlobalAwayTeamId = 30000006L,
GlobalHomeTeamId = 30000016L, HomeTeamScore = 3L, AwayTeamScore = 1L,
TotalScore = 4L, PregameOdds = list(), LiveOdds = list(
list(GameOddId = 385269L, Sportsbook = NULL, GameId = 14492L,
Created = "2019-04-14T21:16:43", Updated = "2019-04-14T21:44:55",
HomeMoneyLine = -475L, AwayMoneyLine = 327L,
HomePointSpread = -1.7, AwayPointSpread = 1.7,
HomePointSpreadPayout = 202L, AwayPointSpreadPayout = -254L,
OverUnder = 5.1, OverPayout = -174L, UnderPayout = 146L))),
list(GameId = 14493L, Season = 2019L, SeasonType = 3L, Day = "2019-04-14T00:00:00",
DateTime = "2019-04-14T19:30:00", Status = "Final", AwayTeamId = 22L,
HomeTeamId = 20L, AwayTeamName = "WPG", HomeTeamName = "STL",
GlobalGameId = 30014493L, GlobalAwayTeamId = 30000022L,
GlobalHomeTeamId = 30000020L, HomeTeamScore = 3L, AwayTeamScore = 6L,
TotalScore = 10L, PregameOdds = list(), LiveOdds = list(
list(GameOddId = 385329L, Sportsbook = NULL, GameId = 14493L,
Created = "2019-04-14T21:49:05", Updated = "2019-04-14T22:19:58",
HomeMoneyLine = NULL, AwayMoneyLine = NULL, HomePointSpread = 3.9,
AwayPointSpread = -3.9, HomePointSpreadPayout = -272L,
AwayPointSpreadPayout = 216L, OverUnder = 8.5,
OverPayout = -226L, UnderPayout = 184L))), list(
GameId = 14494L, Season = 2019L, SeasonType = 3L, Day = "2019-04-14T00:00:00",
DateTime = "2019-04-14T22:00:00", Status = "Final", AwayTeamId = 27L,
HomeTeamId = 35L, AwayTeamName = "SJ", HomeTeamName = "VEG",
GlobalGameId = 30014494L, GlobalAwayTeamId = 30000027L,
GlobalHomeTeamId = 30000035L, HomeTeamScore = 6L, AwayTeamScore = 3L,
TotalScore = 10L, PregameOdds = list(), LiveOdds = list(
list(GameOddId = 385764L, Sportsbook = NULL, GameId = 14494L,
Created = "2019-04-15T00:24:40", Updated = "2019-04-15T00:54:53",
HomeMoneyLine = NULL, AwayMoneyLine = NULL, HomePointSpread = -2.8,
AwayPointSpread = 2.8, HomePointSpreadPayout = 129L,
AwayPointSpreadPayout = -149L, OverUnder = 10.7,
OverPayout = 126L, UnderPayout = -145L))))