I'm trying to pull data from a json file using a wildcard.
The data I'm trying to pull are the game stats for every player from this json file. They are under
http://statsapi-default-elb-prod-876255662.us-east-1.elb.amazonaws.com/api/v1/game/565711/boxscore
I've tested the jsonpath using this website
http://jsonpath.herokuapp.com/
If I enter this json path
teams..players..person.fullName
I get a list of all the players
"Shane Bieber",
"Jon Edwards",
"Max Moroff",
"Jake Bauers",
"Tyler Olson",
"Nick Wittgren",
"Carlos Carrasco",
"Leonys Martin",
"Neil Ramirez",
"Greg Allen",
"Kevin Plawecki",
"Brad Miller",
"Jordan Luplow".
etc...
However when I put that code into r I get an error
Error: unexpected '*' in " repos$teams$*"
I've tried the following codes
repos$teams$*$players$*$person$fullName
repos$teams$[*]$players$[*]$person$fullName
repos$teams$[[*]]$players$[[*]]$person$fullName
The end goal is to get all the games stats for each player in to a dataframe
Can someone please point me in the right direction? I'm new to json with R, thought I was doing pretty good, then this hit me between the eyes! ha!
Thanks!