I know how to store a string as a variable, for example: API="http://localhost:4741"
However, for the sake of a CURL request I would like to be able to store on object as a variable that I can access values on, something like OBJ="{name : Joe}". Is this possible?
Right now my CURL request looks like this:
curl --include --request POST localhost:3000/scrape \
  --header "Content-Type: application/json" \
  --data '{
    "url": "http://www.oddsshark.com/stats/gamelog/basketball/nba/20736",
    "team": "LA Clippers"
  }'
I would like to be able to do something like this, using a dictionary or an object:
TEAM=( ["Clippers"]="http://www.oddsshark.com/stats/gamelog/basketball/nba/20736" )
curl --include --request POST localhost:3000/scrape \
  --header "Content-Type: application/json" \
  --data '{
    "url": "http://www.oddsshark.com/stats/gamelog/basketball/nba/20736",
    "team": "${TEAM[Clippers]}"
  }'
