Skip to content

Instantly share code, notes, and snippets.

View mdupless's full-sized avatar

Michael DuPlessis mdupless

View GitHub Profile
Basic API interaction test.
Write a function that fetches all the pages of json objects returned by the api.
Return the list of coalesced json user objects.
The API is the (public) endpoint:
https://interview-test-api.maestroqa.com/maestro-etl-interview
Pages are specified by the queryParameter: "page=", starting at 0
<!DOCTYPE HTML PUBLIC>
<html>
<head>
<title> Fun JS Exercises </title>
<!-- Load underscore.js
Feel free to use functions like _.each, _.map, _.filter, etc.
See docs here: http://underscorejs.org/
-->
"""
Merge user objects to provide a final single object for each user
(identity resolution)
We should merge two objects if they share any of the same 'primary' key. The
five possible primary keys are:
- zendesk_id
- email
- phone_number
- social_security
- salesforce_id
@mdupless
mdupless / js_test.js
Last active June 28, 2018 17:37
Write a function to practice javascript server skills
/**
Merge user objects to provide a final single object for each user
(identity resolution)
We should merge two objects if they share any of the same 'primary' key. The
four possible primary keys are:
- zendesk_id
- email
- phone_number
- salesforce_id
For all other fields, a match on any other key does not indicate that the users should be merged