parse-server

How to populate a parse-server Class with a json file?


I have a json file and I would like to use it to populate an empty Class in parse. Is there a way to do this thru the parse dashboard or do I have to do this thru the mongoDB or do I have to do this manually?


Solution

  • iterate thru your json, building a script file using curl and the parse rest api that does following type curl post to parse.class that you need .

    curl -X POST \
      -H "X-Parse-Application-Id: YOUR_APP_ID" \
      -H "Content-Type: application/json" \
      -d '{"score":1337,"playerName":"Sean Plott","cheatMode":false}' \
      http://localhost:1337/parse/classes/${class}