Skip to content

Instantly share code, notes, and snippets.

@yetithefoot
Created December 26, 2013 14:31
Show Gist options
  • Save yetithefoot/8134475 to your computer and use it in GitHub Desktop.
Save yetithefoot/8134475 to your computer and use it in GitHub Desktop.
Retrieves Parse.com object, filter it and converts to CSV(without header)
# converts Parse.com json object presentation to CSV with simple filtering
# dependency - jq command line tool
# NOTE: Parse.com API does not allow to get more than 1000 records per request, so you need to vary skip and limit params
# https://www.parse.com/docs/rest#general-quick
# NOTE: Also you can download exported Parse.com backup (Parse.com\Settings\Export) and read via "cat filename | jq '.'".
echo `curl -H 'X-Parse-Application-Id: <PASTE_YOUR_APP_ID_HERE>' -H 'X-Parse-REST-API-Key: <PASTE_YOUR_REST_API_KEY_HERE>' -H 'Content-Type: application/json' -L https://api.parse.com/1/classes/Email\?skip=0\&limit=1000 -s` | jq '.results[] | .email +","+.type +","+ .createdAt'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment